prism 0.19.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -1
- data/Makefile +5 -0
- data/README.md +8 -6
- data/config.yml +236 -38
- data/docs/build_system.md +19 -2
- data/docs/cruby_compilation.md +27 -0
- data/docs/parser_translation.md +34 -0
- data/docs/parsing_rules.md +19 -0
- data/docs/releasing.md +3 -3
- data/docs/ruby_api.md +1 -1
- data/docs/serialization.md +17 -5
- data/ext/prism/api_node.c +101 -81
- data/ext/prism/extension.c +74 -11
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +1699 -504
- data/include/prism/defines.h +8 -0
- data/include/prism/diagnostic.h +39 -2
- data/include/prism/encoding.h +10 -0
- data/include/prism/options.h +40 -14
- data/include/prism/parser.h +33 -17
- data/include/prism/util/pm_buffer.h +9 -0
- data/include/prism/util/pm_constant_pool.h +7 -0
- data/include/prism/util/pm_newline_list.h +0 -11
- data/include/prism/version.h +2 -2
- data/include/prism.h +19 -2
- data/lib/prism/debug.rb +11 -5
- data/lib/prism/dot_visitor.rb +36 -14
- data/lib/prism/dsl.rb +22 -22
- data/lib/prism/ffi.rb +2 -2
- data/lib/prism/node.rb +1020 -737
- data/lib/prism/node_ext.rb +2 -2
- data/lib/prism/parse_result.rb +17 -9
- data/lib/prism/serialize.rb +53 -29
- data/lib/prism/translation/parser/compiler.rb +1831 -0
- data/lib/prism/translation/parser/lexer.rb +335 -0
- data/lib/prism/translation/parser/rubocop.rb +37 -0
- data/lib/prism/translation/parser.rb +163 -0
- data/lib/prism/translation.rb +11 -0
- data/lib/prism.rb +1 -0
- data/prism.gemspec +12 -5
- data/rbi/prism.rbi +150 -88
- data/rbi/prism_static.rbi +15 -3
- data/sig/prism.rbs +996 -961
- data/sig/prism_static.rbs +123 -46
- data/src/diagnostic.c +259 -219
- data/src/encoding.c +4 -8
- data/src/node.c +2 -6
- data/src/options.c +24 -5
- data/src/prettyprint.c +174 -42
- data/src/prism.c +1136 -328
- data/src/serialize.c +12 -9
- data/src/token_type.c +353 -4
- data/src/util/pm_buffer.c +11 -0
- data/src/util/pm_constant_pool.c +12 -11
- data/src/util/pm_newline_list.c +2 -14
- metadata +10 -3
- data/docs/building.md +0 -29
data/rbi/prism_static.rbi
CHANGED
@@ -32,9 +32,6 @@ class Prism::ParseWarning
|
|
32
32
|
end
|
33
33
|
|
34
34
|
class Prism::Node
|
35
|
-
sig { returns(T::Array[T.nilable(Prism::Node)]) }
|
36
|
-
def child_nodes; end
|
37
|
-
|
38
35
|
sig { returns(Prism::Location) }
|
39
36
|
def location; end
|
40
37
|
|
@@ -43,6 +40,21 @@ class Prism::Node
|
|
43
40
|
|
44
41
|
sig { returns(String) }
|
45
42
|
def to_dot; end
|
43
|
+
|
44
|
+
sig { params(visitor: Prism::Visitor).void }
|
45
|
+
def accept(visitor); end
|
46
|
+
|
47
|
+
sig { returns(T::Array[T.nilable(Prism::Node)]) }
|
48
|
+
def child_nodes; end
|
49
|
+
|
50
|
+
sig { returns(T::Array[Prism::Node]) }
|
51
|
+
def compact_child_nodes; end
|
52
|
+
|
53
|
+
sig { returns(T::Array[T.nilable(Prism::Node)]) }
|
54
|
+
def deconstruct; end
|
55
|
+
|
56
|
+
sig { returns(Symbol) }
|
57
|
+
def type; end
|
46
58
|
end
|
47
59
|
|
48
60
|
class Prism::Comment
|