Skip to content

Commit 7f2084a

Browse files
committed
Include SourceSection in TruffleASTPrinter output
1 parent d543a0a commit 7f2084a

File tree

217 files changed

+246
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+246
-3
lines changed

spec/truffle/parsing/fixtures/BEGIN/BEGIN.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ast: |
3131
retryProfile = false
3232
returnID = org.truffleruby.language.control.ReturnID@...
3333
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <top (required)>, blockDepth = 0, parseName = <top (required)>, notes = null, argumentDescriptors = null)
34+
sourceSection = SourceSection(source=<parse_ast> [1:1 - 4:1], index=0, length=15, characters=b\nBEGIN {\n a\n})
3435
split = HEURISTIC
3536
children:
3637
body =

spec/truffle/parsing/fixtures/BEGIN/when_multiple_occurrences.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ast: |
3939
retryProfile = false
4040
returnID = org.truffleruby.language.control.ReturnID@...
4141
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <top (required)>, blockDepth = 0, parseName = <top (required)>, notes = null, argumentDescriptors = null)
42+
sourceSection = SourceSection(source=<parse_ast> [1:1 - 11:1], index=0, length=43, characters=BEGIN {\n a\n}\n\nBEGIN {\n b\n}\n\nBEGIN {\n c\n})
4243
split = HEURISTIC
4344
children:
4445
body =

spec/truffle/parsing/fixtures/END.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ ast: |
8383
retryProfile = false
8484
returnID = org.truffleruby.language.control.ReturnID@...
8585
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [])
86+
sourceSection = SourceSection(source=<parse_ast> available=false)
8687
split = HEURISTIC
8788
children:
8889
body =

spec/truffle/parsing/fixtures/TOPLEVEL_BINDING.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ast: |
2323
retryProfile = false
2424
returnID = org.truffleruby.language.control.ReturnID@...
2525
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <main>, blockDepth = 0, parseName = <main>, notes = null, argumentDescriptors = null)
26+
sourceSection = SourceSection(source=<parse_ast> [1:1 - 1:5], index=0, length=5, characters=a = 1)
2627
split = HEURISTIC
2728
children:
2829
body =

spec/truffle/parsing/fixtures/__END__.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ast: |
2525
retryProfile = false
2626
returnID = org.truffleruby.language.control.ReturnID@...
2727
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <main>, blockDepth = 0, parseName = <main>, notes = null, argumentDescriptors = null)
28+
sourceSection = SourceSection(source=<parse_ast> [1:1 - 3:9], index=0, length=23, characters=a = 1\n__END__\nsome data)
2829
split = HEURISTIC
2930
children:
3031
body =

spec/truffle/parsing/fixtures/block/argument_descriptors/with_block.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ast: |
3333
retryProfile = false
3434
returnID = org.truffleruby.language.control.ReturnID@...
3535
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = bar, type = block)])
36+
sourceSection = SourceSection(source=<parse_ast> [1:6 - 2:3], index=5, length=13, characters=do |&bar|\nend)
3637
split = HEURISTIC
3738
children:
3839
body =

spec/truffle/parsing/fixtures/block/argument_descriptors/with_double_splat_operator.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ ast: |
3535
retryProfile = false
3636
returnID = org.truffleruby.language.control.ReturnID@...
3737
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq), ArgumentDescriptor(name = other, type = keyrest)])
38+
sourceSection = SourceSection(source=<parse_ast> [1:6 - 2:3], index=5, length=24, characters=do |a:, b:, **other|\nend)
3839
split = HEURISTIC
3940
children:
4041
body =

spec/truffle/parsing/fixtures/block/argument_descriptors/with_double_splat_operator_without_name.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ast: |
3636
retryProfile = false
3737
returnID = org.truffleruby.language.control.ReturnID@...
3838
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq), ArgumentDescriptor(name = %kwrest, type = anonkeyrest)])
39+
sourceSection = SourceSection(source=<parse_ast> [1:6 - 2:3], index=5, length=19, characters=do |a:, b:, **|\nend)
3940
split = HEURISTIC
4041
children:
4142
body =

spec/truffle/parsing/fixtures/block/argument_descriptors/with_implicit_rest_parameter.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ ast: |
3030
retryProfile = false
3131
returnID = org.truffleruby.language.control.ReturnID@...
3232
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 1, optional = 0, hasRest = true, isImplicitRest = true, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = a, type = req)])
33+
sourceSection = SourceSection(source=<parse_ast> [1:6 - 2:3], index=5, length=11, characters=do |a,|\nend)
3334
split = HEURISTIC
3435
children:
3536
body =

spec/truffle/parsing/fixtures/block/argument_descriptors/with_keyword_arguments.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ast: |
3434
retryProfile = false
3535
returnID = org.truffleruby.language.control.ReturnID@...
3636
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, isImplicitRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = false}, originName = block in <top (required)>, blockDepth = 1, parseName = block in <top (required)>, notes = <top (required)>, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq)])
37+
sourceSection = SourceSection(source=<parse_ast> [1:6 - 2:3], index=5, length=15, characters=do |a:, b:|\nend)
3738
split = HEURISTIC
3839
children:
3940
body =

0 commit comments

Comments
 (0)