private AstExpr ParseRef() { AstExpr varRef = new AstVarRef { StName = Expect(Ktoken.Id).St }; if (Accept(Ktoken.Lbracket)) { var astIndex = new AstIndex { exprLeft = varRef, exprRight = ParseExpr() }; Expect(Ktoken.Rbracket); return(astIndex); } if (Accept(Ktoken.Dot)) { var varRefRight = new AstVarRef { StName = Expect(Ktoken.Id).St }; varRef = new AstDot { varLeft = (AstVarRef)varRef, varRight = varRefRight }; } if (FCurrent(Ktoken.Lparen)) { return new AstCall { exprFunc = varRef, rgexprParam = ParseArgumentList().ToArray() } } ; return(varRef); }
private void CompileDot(AstDot node, Syt syt, StringBuilder sb) { throw new NotImplementedException(); }