public class ByteArrayLexerSource extends LexerSource
line, lineOffset, offset| Constructor and Description |
|---|
ByteArrayLexerSource(String sourceName,
byte[] in,
List<String> list,
int line,
boolean extraPositionInformation) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCurrentLine() |
InputStream |
getRemainingAsStream() |
boolean |
lastWasBeginOfLine() |
boolean |
matchMarker(org.jruby.util.ByteList marker,
boolean indent,
boolean withNewline)
Match marker against input consumering lexer source as it goes...Unless it does not match
then it reverts lexer source back to point when this method was invoked.
|
boolean |
peek(int c) |
int |
read() |
org.jruby.util.ByteList |
readLineBytes() |
org.jruby.util.ByteList |
readUntil(char marker) |
int |
skipUntil(int marker) |
void |
unread(int c) |
void |
unreadMany(CharSequence line) |
boolean |
wasBeginOfLine() |
captureFeature, getFilename, getLine, getOffset, getPosition, getPosition, getSource, getSource, getVirtualLine, makePointer, readCodepoint, uncaptureFeaturepublic boolean matchMarker(org.jruby.util.ByteList marker,
boolean indent,
boolean withNewline)
throws IOException
LexerSourcematchMarker in class LexerSourcemarker - to match againstindent - eat any leading whitespacewithNewline - includes a check that marker is followed by newline or EOFIOException - if an error occurred reading from underlying IO sourcepublic int read()
read in class LexerSourcepublic org.jruby.util.ByteList readUntil(char marker)
throws IOException
readUntil in class LexerSourceIOExceptionpublic org.jruby.util.ByteList readLineBytes()
throws IOException
readLineBytes in class LexerSourceIOExceptionpublic int skipUntil(int marker)
throws IOException
skipUntil in class LexerSourceIOExceptionpublic void unread(int c)
unread in class LexerSourcepublic void unreadMany(CharSequence line)
unreadMany in class LexerSourcepublic boolean peek(int c)
throws IOException
peek in class LexerSourceIOExceptionpublic boolean lastWasBeginOfLine()
lastWasBeginOfLine in class LexerSourcepublic boolean wasBeginOfLine()
wasBeginOfLine in class LexerSourcepublic String getCurrentLine()
getCurrentLine in class LexerSourcepublic InputStream getRemainingAsStream()
getRemainingAsStream in class LexerSourceCopyright © 2001-2013 JRuby. All Rights Reserved.