Class BasicLexialElementFactory

java.lang.Object
com.scriptbasic.lexer.BasicLexialElementFactory

public final class BasicLexialElementFactory
extends java.lang.Object
Factory to create a new BasicLexicalElement initializing some fields from the reader.
Author:
Peter Verhas
  • Method Summary

    Modifier and Type Method Description
    static BasicLexicalElement create​(SourceReader reader)
    Create a new BasicLexicalElement and fill in the FileName, LineNumber and the Position from the current position of the reader.
    static BasicLexicalElement create​(SourceReader reader, int type)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static BasicLexicalElement create​(SourceReader reader)
      Create a new BasicLexicalElement and fill in the FileName, LineNumber and the Position from the current position of the reader.
      Parameters:
      reader - from where we are going to read the lexical element
      Returns:
      a new and initialized lexical element object
    • create

      public static BasicLexicalElement create​(SourceReader reader, int type)