Class LexerSource

java.lang.Object
org.jruby.lexer.LexerSource
Direct Known Subclasses:
ByteListLexerSource, GetsLexerSource

public abstract class LexerSource extends Object
Simple source capable of providing the next line in Ruby source file being lex'd.
  • Field Details

    • scriptLines

      protected RubyArray scriptLines
  • Constructor Details

    • LexerSource

      public LexerSource(String sourceName, int lineOffset, RubyArray scriptLines)
  • Method Details

    • getFilename

      public String getFilename()
      What file are we lexing?
      Returns:
      the files name
    • getLineOffset

      public int getLineOffset()
    • encodeExistingScriptLines

      public void encodeExistingScriptLines(org.jcodings.Encoding encoding)
    • getEncoding

      public abstract org.jcodings.Encoding getEncoding()
    • setEncoding

      public abstract void setEncoding(org.jcodings.Encoding encoding)
    • gets

      public abstract ByteList gets()
    • getOffset

      public abstract int getOffset()
    • getRemainingAsChannel

      public abstract Channel getRemainingAsChannel()
    • getRemainingAsIO

      public abstract IRubyObject getRemainingAsIO()