Class NodeUtils

    • Constructor Detail

      • NodeUtils

        public NodeUtils()
    • Method Detail

      • getSpecialText

        public static StringBuilder getSpecialText​(Parser parser,
                                                   Token t)
        Collect all the <SPECIAL_TOKEN>s that are carried along with a token. Special tokens do not participate in parsing but can still trigger certain lexical actions. In some cases you may want to retrieve these special tokens, this is simply a way to extract them.
        Parameters:
        t - the Token
        Returns:
        StrBuilder with the special tokens.
        Since:
        2.0.0
      • tokenLiteral

        public static String tokenLiteral​(Parser parser,
                                          Token t)
        complete node literal
        Parameters:
        t -
        Returns:
        A node literal.
      • fixIndentation

        public static void fixIndentation​(SimpleNode parent,
                                          String parentIndentation)
        Fix children indentation in structured space gobbling mode.
        Parameters:
        parent -
        parentIndentation -