pynescript.ext.pygments.lexers module¶
- class pynescript.ext.pygments.lexers.PinescriptLexer(**options)¶
Bases:
Lexer- aliases: ClassVar[list[str]] = ['pinescript']¶
A list of short, unique identifiers that can be used to look up the lexer from a list, e.g., using get_lexer_by_name().
- filenames: ClassVar[list[str]] = ['*.pine']¶
A list of fnmatch patterns that match filenames which contain content for this lexer. The patterns in this list should be unique among all lexers.
- get_tokens_unprocessed(text)¶
This method should process the text and return an iterable of
(index, tokentype, value)tuples whereindexis the starting position of the token within the input text.It must be overridden by subclasses. It is recommended to implement it as a generator to maximize effectiveness.
- Parameters:
text (str)
- name: ClassVar[str] = 'Pinescript Lexer'¶
Full name of the lexer, in human-readable form
- url: ClassVar[str] = 'https://www.tradingview.com/pine-script-docs/en/v5/Introduction.html'¶
URL of the language specification/definition. Used in the Pygments documentation. Set to an empty string to disable.