MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / parseExpr

Function parseExpr

src/parser/syntaxes/expressions.ts:12–18  ·  view source on GitHub ↗
(s: ITokenStream, isStatic: boolean)

Source from the content-addressed store, hash-verified

10import type { ITokenStream } from '../streams/token-stream.js';
11
12export function parseExpr(s: ITokenStream, isStatic: boolean): Ast.Expression {
13 if (isStatic) {
14 return parseAtom(s, true);
15 } else {
16 return parsePratt(s, 0);
17 }
18}
19
20// NOTE: infix(中置演算子)ではlbpを大きくすると右結合、rbpを大きくすると左結合の演算子になります。
21// この値は演算子が左と右に対してどのくらい結合力があるかを表わしています。詳細はpratt parsingの説明ページを参照してください。

Callers 15

parseDestFunction · 0.85
parseParamsFunction · 0.85
parseMetaFunction · 0.85
parseStatementFunction · 0.85
parseVarDefFunction · 0.85
parseOutFunction · 0.85
parseEachFunction · 0.85
parseForFunction · 0.85
parseReturnFunction · 0.85
parseAttrFunction · 0.85
parseDoWhileFunction · 0.85
parseWhileFunction · 0.85

Calls 2

parseAtomFunction · 0.85
parsePrattFunction · 0.85

Tested by

no test coverage detected