void unit(LiteralDeclaration decl) { Expect(6); decl.Unit = la.val; MethodDeclaration decl2 = null; template(out decl2); Expect(7); }
void literal(out IDeclaration exprs) { exprs = null; if (la.kind == 3) { LiteralDeclaration decl = new LiteralDeclaration(); decl.Value = la.val; Get(); if (la.kind == 6) { unit(decl); } decl.Kind = LiteralKind.Float; exprs = decl; } else if (la.kind == 2) { LiteralDeclaration decl = new LiteralDeclaration(); decl.Value = la.val; Get(); if (la.kind == 6) { unit(decl); } decl.Kind = LiteralKind.Integer; exprs = decl; } else if (la.kind == 4) { LiteralDeclaration decl = new LiteralDeclaration(); decl.Value = la.val; Get(); decl.Kind = LiteralKind.Char; exprs = decl; } else if (la.kind == 5) { LiteralDeclaration decl = new LiteralDeclaration(); decl.Value = la.val; Get(); decl.Kind = LiteralKind.String; exprs = decl; } else SynErr(21); }