minjs 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +0,0 @@
1
- module Minjs
2
- #
3
- # 14 Program
4
- #
5
- module Program
6
- def program(lex, context)
7
- prog = source_elements(@lex, @global_context)
8
- if lex.eof?
9
- return prog
10
- else
11
- raise ParseError.new("unexpceted token", lex)
12
- end
13
- end
14
-
15
- def source_elements(lex, context, options = {})
16
- prog = []
17
- while t = source_element(lex, context)
18
- prog.push(t)
19
- end
20
- ECMA262::Prog.new(context, ECMA262::SourceElements.new(prog))
21
- end
22
-
23
- def source_element(lex, context)
24
- #lex.eval_lit{
25
- statement(lex, context)
26
- #} or lex.eval_lit{ => statement
27
- # func_declaration(lex, context)
28
- #}
29
- end
30
- end
31
- end
32
-