Skip to content

Commit 72ecd94

Browse files
committed
Add YAML fixture for parser warnings
1 parent 17a032e commit 72ecd94

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
subject: "Warnings"
2+
description: "Warnings emitted during parsing"
3+
notes: >
4+
Warnings are represented with EmitWarningsNode node.
5+
yarp_specific: true # YARP provides a bit different message and verbosity changed from VERBOSE to NON_VERBOSE
6+
focused_on_node: "org.truffleruby.language.control.SequenceNode"
7+
ruby: |
8+
puts *[]
9+
ast: |
10+
SequenceNode
11+
attributes:
12+
flags = 12
13+
children:
14+
body = [
15+
EmitWarningsNode
16+
attributes:
17+
flags = 0
18+
warnings = RubyDeferredWarnings(WarningMessage(message = 'ambiguous `*` has been interpreted as an argument prefix', verbosity = NON_VERBOSE, fileName = '<parse_ast>', lineNumber = 1))
19+
WriteLocalVariableNode
20+
attributes:
21+
flags = 0
22+
frameSlot = 0 # (self)
23+
children:
24+
valueNode =
25+
ProfileArgumentNodeGen
26+
attributes:
27+
flags = 0
28+
children:
29+
childNode_ =
30+
ReadSelfNode
31+
attributes:
32+
flags = 0
33+
RubyCallNode
34+
attributes:
35+
descriptor = NoKeywordArgumentsDescriptor
36+
dispatchConfig = PRIVATE
37+
emptyKeywordsProfile = false
38+
flags = 1
39+
isAttrAssign = false
40+
isSafeNavigation = false
41+
isSplatted = true
42+
isVCall = false
43+
lastArgIsNotHashProfile = false
44+
methodName = "puts"
45+
notEmptyKeywordsProfile = false
46+
notRuby2KeywordsHashProfile = false
47+
children:
48+
arguments = [
49+
SplatCastNodeGen
50+
attributes:
51+
conversionMethod = :to_a
52+
copy = false
53+
flags = 0
54+
nilBehavior = CONVERT
55+
children:
56+
childNode_ =
57+
ArrayLiteralNode$UninitialisedArrayLiteralNode
58+
attributes:
59+
flags = 0
60+
language = org.truffleruby.RubyLanguage@...
61+
]
62+
receiver =
63+
SelfNode
64+
attributes:
65+
flags = 0
66+
]

0 commit comments

Comments
 (0)