parser 2.2.0.pre.6 → 2.2.0.pre.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/doc/AST_FORMAT.md +32 -0
- data/lib/parser/meta.rb +3 -2
- data/lib/parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c475c4f4b0f2f809457730f3f08d89da23c9d654
|
4
|
+
data.tar.gz: ed615ef296c488bf157056521eba3d3fce506aca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7afe4b8d6788f058b0f50863852b0b0cc1fd77be8269d954684e2100cdd5e62b915f380ef58647ce66890715c42aaef69ff24ea6b0200164334c0cae160c19a3
|
7
|
+
data.tar.gz: f26204d01ee7e0e6db6612b085b20cd3e56cfd670d0efba84102f0dca240be11626c5a595f3e6d9f383a78cde0b5d5089e4aad3a616fa7f9579e1cd3df5ec151
|
data/CHANGELOG.md
CHANGED
data/doc/AST_FORMAT.md
CHANGED
@@ -34,6 +34,10 @@ Format:
|
|
34
34
|
"-123"
|
35
35
|
^ operator
|
36
36
|
~~~ expression
|
37
|
+
|
38
|
+
(int 1)
|
39
|
+
"__LINE__"
|
40
|
+
~~~~~~~~ expression
|
37
41
|
~~~
|
38
42
|
|
39
43
|
### Float
|
@@ -51,6 +55,30 @@ Format:
|
|
51
55
|
~~~~ expression
|
52
56
|
~~~
|
53
57
|
|
58
|
+
### Complex
|
59
|
+
|
60
|
+
Format:
|
61
|
+
|
62
|
+
~~~
|
63
|
+
(complex (0+1i))
|
64
|
+
"1i"
|
65
|
+
~~ expression
|
66
|
+
|
67
|
+
(complex (0+(1/1)*i))
|
68
|
+
"1ri"
|
69
|
+
~~~ expression
|
70
|
+
~~~
|
71
|
+
|
72
|
+
### Rational
|
73
|
+
|
74
|
+
Format:
|
75
|
+
|
76
|
+
~~~
|
77
|
+
(rational (2/1))
|
78
|
+
"2.0r"
|
79
|
+
~~~~ expression
|
80
|
+
~~~
|
81
|
+
|
54
82
|
### String
|
55
83
|
|
56
84
|
#### Plain
|
@@ -63,6 +91,10 @@ Format:
|
|
63
91
|
^ begin
|
64
92
|
^ end
|
65
93
|
~~~~~ expresion
|
94
|
+
|
95
|
+
(string "foo.rb")
|
96
|
+
"__FILE__"
|
97
|
+
~~~~~~~~ expression
|
66
98
|
~~~
|
67
99
|
|
68
100
|
#### With interpolation
|
data/lib/parser/meta.rb
CHANGED
@@ -2,7 +2,8 @@ module Parser
|
|
2
2
|
# Parser metadata
|
3
3
|
module Meta
|
4
4
|
|
5
|
-
#
|
5
|
+
# All node types that parser can produce. Not all parser versions
|
6
|
+
# will be able to produce every possible node.
|
6
7
|
NODE_TYPES =
|
7
8
|
%w(
|
8
9
|
true false nil int float str dstr str
|
@@ -19,7 +20,7 @@ module Parser
|
|
19
20
|
and not or if when case while until while_post
|
20
21
|
until_post for break next redo return resbody
|
21
22
|
kwbegin begin retry preexe postexe iflipflop eflipflop
|
22
|
-
shadowarg
|
23
|
+
shadowarg complex rational __FILE__ __LINE__
|
23
24
|
).map(&:to_sym).to_set.freeze
|
24
25
|
|
25
26
|
end # Meta
|
data/lib/parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.0.pre.
|
4
|
+
version: 2.2.0.pre.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Zotov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ast
|