public class ByteArrayLexerSource extends LexerSource
line, offset| Constructor and Description |
|---|
ByteArrayLexerSource(java.lang.String sourceName,
byte[] in,
java.util.List<java.lang.String> list,
int line,
boolean extraPositionInformation) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCurrentLine() |
java.io.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(java.lang.CharSequence line) |
boolean |
wasBeginOfLine() |
captureFeature, getFilename, getLine, getOffset, getPosition, getPosition, getSource, getSource, makePointer, readCodepoint, uncaptureFeaturepublic ByteArrayLexerSource(java.lang.String sourceName,
byte[] in,
java.util.List<java.lang.String> list,
int line,
boolean extraPositionInformation)
public boolean matchMarker(org.jruby.util.ByteList marker,
boolean indent,
boolean withNewline)
throws java.io.IOException
LexerSourcematchMarker in class LexerSourcemarker - to match againstindent - eat any leading whitespacewithNewline - includes a check that marker is followed by newline or EOFjava.io.IOException - if an error occurred reading from underlying IO sourcepublic int read()
read in class LexerSourcepublic org.jruby.util.ByteList readUntil(char marker)
throws java.io.IOException
readUntil in class LexerSourcejava.io.IOExceptionpublic org.jruby.util.ByteList readLineBytes()
throws java.io.IOException
readLineBytes in class LexerSourcejava.io.IOExceptionpublic int skipUntil(int marker)
throws java.io.IOException
skipUntil in class LexerSourcejava.io.IOExceptionpublic void unread(int c)
unread in class LexerSourcepublic void unreadMany(java.lang.CharSequence line)
unreadMany in class LexerSourcepublic boolean peek(int c)
throws java.io.IOException
peek in class LexerSourcejava.io.IOExceptionpublic boolean lastWasBeginOfLine()
lastWasBeginOfLine in class LexerSourcepublic boolean wasBeginOfLine()
wasBeginOfLine in class LexerSourcepublic java.lang.String getCurrentLine()
getCurrentLine in class LexerSourcepublic java.io.InputStream getRemainingAsStream()
getRemainingAsStream in class LexerSourceCopyright © 2002-2009 JRuby Team. All Rights Reserved.