ml_switcheroo.compiler.frontends.sass.parser ============================================ .. py:module:: ml_switcheroo.compiler.frontends.sass.parser .. autoapi-nested-parse:: SASS Parser Implementation. This module provides the `SassParser`, a recursive descent parser that converts a stream of tokens (from `SassLexer`) into a Structural AST defined in `nodes.py`. Classes ------- .. autoapisummary:: ml_switcheroo.compiler.frontends.sass.parser.LabelRef ml_switcheroo.compiler.frontends.sass.parser.SassParser Module Contents --------------- .. py:class:: LabelRef Bases: :py:obj:`ml_switcheroo.compiler.frontends.sass.nodes.Operand` Base class for instruction operands (Registers, Immediates, etc.). .. py:attribute:: name :type: str .. py:method:: __str__() -> str Returns the valid SASS string representation of the node. .. py:class:: SassParser(code: str) Recursive descent parser for NVIDIA SASS. .. py:attribute:: lexer .. py:attribute:: tokens .. py:attribute:: pos :value: 0 .. py:method:: parse() -> List[ml_switcheroo.compiler.frontends.sass.nodes.SassNode] Parses the entire code block. :returns: A list of AST nodes. :rtype: List[SassNode]