pynescript.ast.grammar.antlr4.generated.PinescriptLexerBase module

class pynescript.ast.grammar.antlr4.generated.PinescriptLexerBase.PinescriptLexerBase(input, output=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)

Bases: Lexer

  • ignore possible leading newlines

  • ignore excessive trailing newlines except a single newline

  • ensure that script ends with a newline if none

  • ignore consecutive newlines except the last one

  • ignore newlines inside open parentheses, brackets

  • ignore newlines after operators

  • ignore newlines for line wrapping (lines whose indentation width is not a multiple of four)

  • track indentation level, push INDENT or DEDENT token respectfully

  • handle multiline string literal correctly (ignore <newline + indentation for line wrapping>)

Parameters:
  • input (InputStream)

  • output (TextIO)

nextToken()
Return type:

CommonToken

reset()