JavaScript:SpiderMonkey:Parser API: Difference between revisions

Line 32: Line 32:


1. Parsing a script using js_ParseTokenStream
1. Parsing a script using js_ParseTokenStream
2. Walking of the ParseNodes tree using recursion
2. Walking of the ParseNodes tree using recursion
3. Implementation of a simple callback set (HaveNewSubTree,
3. Implementation of a simple callback set (HaveNewSubTree,
HaveNodeInTree, EndSubTree) that is called during the walking of the
HaveNodeInTree, EndSubTree) that is called during the walking of the
Line 51: Line 53:
the second that builds a frequency distribution for 'arity' of nodes,
the second that builds a frequency distribution for 'arity' of nodes,
TOK_ constants and JS Opcodes.
TOK_ constants and JS Opcodes.
5. Implementation of a non-recursive walker making the same callbacks.
5. Implementation of a non-recursive walker making the same callbacks.


3

edits