@@ -21,135 +21,135 @@ export class AST {
2121 * @param {string } text - The input text to parse.
2222 * @returns {ASTNode } The root node of the AST.
2323 */
24- ast ( text : string ) : ASTNode ;
24+ _ast ( text : string ) : ASTNode ;
2525 text : string ;
2626 tokens : import ( "../lexer/token.js" ) . Token [ ] ;
2727 /**
2828 * Parses a program.
2929 * @returns {ASTNode } The program node.
3030 */
31- program ( ) : ASTNode ;
31+ _program ( ) : ASTNode ;
3232 /**
3333 * Parses an expression statement.
3434 * @returns {ASTNode } The expression statement node.
3535 */
36- expressionStatement ( ) : ASTNode ;
36+ _expressionStatement ( ) : ASTNode ;
3737 /**
3838 * Parses a filter chain.
3939 * @returns {ASTNode } The filter chain node.
4040 */
41- filterChain ( ) : ASTNode ;
41+ _filterChain ( ) : ASTNode ;
4242 /**
4343 * Parses an assignment expression.
4444 * @returns {ASTNode } The assignment expression node.
4545 */
46- assignment ( ) : ASTNode ;
46+ _assignment ( ) : ASTNode ;
4747 /**
4848 * Parses a ternary expression.
4949 * @returns {ASTNode } The ternary expression node.
5050 */
51- ternary ( ) : ASTNode ;
51+ _ternary ( ) : ASTNode ;
5252 /**
5353 * Parses a logical OR expression.
5454 * @returns {ASTNode } The logical OR expression node.
5555 */
56- logicalOR ( ) : ASTNode ;
56+ _logicalOR ( ) : ASTNode ;
5757 /**
5858 * Parses a logical AND expression.
5959 * @returns {ASTNode } The logical AND expression node.
6060 */
61- logicalAND ( ) : ASTNode ;
61+ _logicalAND ( ) : ASTNode ;
6262 /**
6363 * Parses an equality expression.
6464 * @returns {ASTNode } The equality expression node.
6565 */
66- equality ( ) : ASTNode ;
66+ _equality ( ) : ASTNode ;
6767 /**
6868 * Parses a relational expression.
6969 * @returns {ASTNode } The relational expression node.
7070 */
71- relational ( ) : ASTNode ;
71+ _relational ( ) : ASTNode ;
7272 /**
7373 * Parses an additive expression.
7474 * @returns {ASTNode } The additive expression node.
7575 */
76- additive ( ) : ASTNode ;
76+ _additive ( ) : ASTNode ;
7777 /**
7878 * Parses a multiplicative expression.
7979 * @returns {ASTNode } The multiplicative expression node.
8080 */
81- multiplicative ( ) : ASTNode ;
81+ _multiplicative ( ) : ASTNode ;
8282 /**
8383 * Parses a unary expression.
8484 * @returns {ASTNode } The unary expression node.
8585 */
86- unary ( ) : ASTNode ;
86+ _unary ( ) : ASTNode ;
8787 /**
8888 * Parses a primary expression.
8989 * @returns {ASTNode } The primary expression node.
9090 */
91- primary ( ) : ASTNode ;
91+ _primary ( ) : ASTNode ;
9292 /**
9393 * Parses a filter.
9494 * @param {ASTNode } baseExpression - The base expression to apply the filter to.
9595 * @returns {ASTNode } The filter node.
9696 */
97- filter ( baseExpression : ASTNode ) : ASTNode ;
97+ _filter ( baseExpression : ASTNode ) : ASTNode ;
9898 /**
9999 * Parses function arguments.
100100 * @returns {ASTNode[] } The arguments array.
101101 */
102- parseArguments ( ) : ASTNode [ ] ;
102+ _parseArguments ( ) : ASTNode [ ] ;
103103 /**
104104 * Parses an identifier.
105105 * @returns {ASTNode } The identifier node.
106106 */
107- identifier ( ) : ASTNode ;
107+ _identifier ( ) : ASTNode ;
108108 /**
109109 * Parses a constant.
110110 * @returns {ASTNode } The constant node.
111111 */
112- constant ( ) : ASTNode ;
112+ _constant ( ) : ASTNode ;
113113 /**
114114 * Parses an array declaration.
115115 * @returns {ASTNode } The array declaration node.
116116 */
117- arrayDeclaration ( ) : ASTNode ;
117+ _arrayDeclaration ( ) : ASTNode ;
118118 /**
119119 * Parses an object.
120120 * @returns {ASTNode } The object node.
121121 */
122- object ( ) : ASTNode ;
122+ _object ( ) : ASTNode ;
123123 /**
124124 * Throws a syntax error.
125125 * @param {string } msg - The error message.
126126 * @param {import("../lexer/lexer.js").Token } [token] - The token that caused the error.
127127 */
128- throwError ( msg : string , token ?: import ( "../lexer/lexer.js" ) . Token ) : void ;
128+ _throwError ( msg : string , token ?: import ( "../lexer/lexer.js" ) . Token ) : void ;
129129 /**
130130 * Consumes a token if it matches the expected type.
131131 * @param {string } [e1] - The expected token type.
132132 * @returns {import("../lexer/lexer.js").Token } The consumed token.
133133 */
134- consume ( e1 ?: string ) : import ( "../lexer/lexer.js" ) . Token ;
134+ _consume ( e1 ?: string ) : import ( "../lexer/lexer.js" ) . Token ;
135135 /**
136136 * Returns the next token without consuming it.
137137 * @returns {import("../lexer/lexer.js").Token } The next token.
138138 */
139- peekToken ( ) : import ( "../lexer/lexer.js" ) . Token ;
139+ _peekToken ( ) : import ( "../lexer/lexer.js" ) . Token ;
140140 /**
141141 * Checks if the next token matches any of the expected types.
142142 * @param {...string } [expected] - The expected token types.
143143 * @returns {import('../lexer/lexer.js').Token|boolean } The next token if it matches, otherwise false.
144144 */
145- peek ( ...expected : string [ ] ) : import ( "../lexer/lexer.js" ) . Token | boolean ;
145+ _peek ( ...expected : string [ ] ) : import ( "../lexer/lexer.js" ) . Token | boolean ;
146146 /**
147147 * Checks if the token at the specified index matches any of the expected types.
148148 * @param {number } i - The index to check.
149149 * @param {...string } [expected] - The expected token types.
150150 * @returns {import("../lexer/lexer.js").Token|boolean } The token at the specified index if it matches, otherwise false.
151151 */
152- peekAhead (
152+ _peekAhead (
153153 i : number ,
154154 ...expected : string [ ]
155155 ) : import ( "../lexer/lexer.js" ) . Token | boolean ;
@@ -158,7 +158,7 @@ export class AST {
158158 * @param {...string } [expected] - The expected token types.
159159 * @returns {import("../lexer/lexer.js").Token|boolean } The consumed token if it matches, otherwise false.
160160 */
161- expect ( ...expected : string [ ] ) : import ( "../lexer/lexer.js" ) . Token | boolean ;
161+ _expect ( ...expected : string [ ] ) : import ( "../lexer/lexer.js" ) . Token | boolean ;
162162}
163163export type ASTNode = import ( "./ast-node.ts" ) . ASTNode ;
164164export type Token = import ( "../lexer/token.js" ) . Token ;
0 commit comments