34
edits
(a couple more notes) |
(fixed up types a little bit) |
||
| Line 8: | Line 8: | ||
interface Visitor<A> { | interface Visitor<A> { | ||
visitThisExpr(attr : {}) : A; | visitThisExpr(attr : {}) : A; | ||
visitReturnStmt(attr : {}, | |||
expr : A) : A; | |||
/* etc. */ | /* etc. */ | ||
} | } | ||
| Line 15: | Line 17: | ||
<pre> | <pre> | ||
class Parser<A | class Parser<A> { | ||
Parser(factory : Visitor<A>?); | Parser(factory : Visitor<A>?); | ||
parse(src : string, | parse(src : string, | ||
[filename : string | [filename : string?, | ||
startLine : (number >= 1)?, | startLine : (number >= 1)?, | ||
startColumn : (number >= 0)?]) | startColumn : (number >= 0)?]) | ||
edits