Skip to content

Commit

Permalink
Separate table access modifiers test and update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
YetAnotherClown committed Oct 8, 2024
1 parent f42db7c commit a26533e
Show file tree
Hide file tree
Showing 6 changed files with 4,301 additions and 4,336 deletions.
374 changes: 374 additions & 0 deletions full-moon/tests/roblox_cases/pass/table_access_modifiers/ast.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,374 @@
---
source: full-moon/tests/pass_cases.rs
expression: ast.nodes()
input_file: full-moon/tests/roblox_cases/pass/table_access_modifiers
---
stmts:
- - TypeDeclaration:
type_token:
leading_trivia: []
token:
start_position:
bytes: 0
line: 1
character: 1
end_position:
bytes: 4
line: 1
character: 5
token_type:
type: Identifier
identifier: type
trailing_trivia:
- start_position:
bytes: 4
line: 1
character: 5
end_position:
bytes: 5
line: 1
character: 6
token_type:
type: Whitespace
characters: " "
base:
leading_trivia: []
token:
start_position:
bytes: 5
line: 1
character: 6
end_position:
bytes: 8
line: 1
character: 9
token_type:
type: Identifier
identifier: Foo
trailing_trivia:
- start_position:
bytes: 8
line: 1
character: 9
end_position:
bytes: 9
line: 1
character: 10
token_type:
type: Whitespace
characters: " "
generics: ~
equal_token:
leading_trivia: []
token:
start_position:
bytes: 9
line: 1
character: 10
end_position:
bytes: 10
line: 1
character: 11
token_type:
type: Symbol
symbol: "="
trailing_trivia:
- start_position:
bytes: 10
line: 1
character: 11
end_position:
bytes: 11
line: 1
character: 12
token_type:
type: Whitespace
characters: " "
declare_as:
Table:
braces:
tokens:
- leading_trivia: []
token:
start_position:
bytes: 11
line: 1
character: 12
end_position:
bytes: 12
line: 1
character: 13
token_type:
type: Symbol
symbol: "{"
trailing_trivia:
- start_position:
bytes: 12
line: 1
character: 13
end_position:
bytes: 13
line: 1
character: 13
token_type:
type: Whitespace
characters: "\n"
- leading_trivia: []
token:
start_position:
bytes: 52
line: 4
character: 1
end_position:
bytes: 53
line: 4
character: 2
token_type:
type: Symbol
symbol: "}"
trailing_trivia: []
fields:
pairs:
- Punctuated:
- access:
leading_trivia:
- start_position:
bytes: 13
line: 2
character: 1
end_position:
bytes: 14
line: 2
character: 2
token_type:
type: Whitespace
characters: "\t"
token:
start_position:
bytes: 14
line: 2
character: 2
end_position:
bytes: 18
line: 2
character: 6
token_type:
type: Identifier
identifier: read
trailing_trivia:
- start_position:
bytes: 18
line: 2
character: 6
end_position:
bytes: 19
line: 2
character: 7
token_type:
type: Whitespace
characters: " "
key:
Name:
leading_trivia: []
token:
start_position:
bytes: 19
line: 2
character: 7
end_position:
bytes: 22
line: 2
character: 10
token_type:
type: Identifier
identifier: bar
trailing_trivia: []
colon:
leading_trivia: []
token:
start_position:
bytes: 22
line: 2
character: 10
end_position:
bytes: 23
line: 2
character: 11
token_type:
type: Symbol
symbol: ":"
trailing_trivia:
- start_position:
bytes: 23
line: 2
character: 11
end_position:
bytes: 24
line: 2
character: 12
token_type:
type: Whitespace
characters: " "
value:
Basic:
leading_trivia: []
token:
start_position:
bytes: 24
line: 2
character: 12
end_position:
bytes: 30
line: 2
character: 18
token_type:
type: Identifier
identifier: number
trailing_trivia: []
- leading_trivia: []
token:
start_position:
bytes: 30
line: 2
character: 18
end_position:
bytes: 31
line: 2
character: 19
token_type:
type: Symbol
symbol: ","
trailing_trivia:
- start_position:
bytes: 31
line: 2
character: 19
end_position:
bytes: 32
line: 2
character: 19
token_type:
type: Whitespace
characters: "\n"
- Punctuated:
- access:
leading_trivia:
- start_position:
bytes: 32
line: 3
character: 1
end_position:
bytes: 33
line: 3
character: 2
token_type:
type: Whitespace
characters: "\t"
token:
start_position:
bytes: 33
line: 3
character: 2
end_position:
bytes: 38
line: 3
character: 7
token_type:
type: Identifier
identifier: write
trailing_trivia:
- start_position:
bytes: 38
line: 3
character: 7
end_position:
bytes: 39
line: 3
character: 8
token_type:
type: Whitespace
characters: " "
key:
Name:
leading_trivia: []
token:
start_position:
bytes: 39
line: 3
character: 8
end_position:
bytes: 42
line: 3
character: 11
token_type:
type: Identifier
identifier: baz
trailing_trivia: []
colon:
leading_trivia: []
token:
start_position:
bytes: 42
line: 3
character: 11
end_position:
bytes: 43
line: 3
character: 12
token_type:
type: Symbol
symbol: ":"
trailing_trivia:
- start_position:
bytes: 43
line: 3
character: 12
end_position:
bytes: 44
line: 3
character: 13
token_type:
type: Whitespace
characters: " "
value:
Basic:
leading_trivia: []
token:
start_position:
bytes: 44
line: 3
character: 13
end_position:
bytes: 50
line: 3
character: 19
token_type:
type: Identifier
identifier: number
trailing_trivia: []
- leading_trivia: []
token:
start_position:
bytes: 50
line: 3
character: 19
end_position:
bytes: 51
line: 3
character: 20
token_type:
type: Symbol
symbol: ","
trailing_trivia:
- start_position:
bytes: 51
line: 3
character: 20
end_position:
bytes: 52
line: 3
character: 20
token_type:
type: Whitespace
characters: "\n"
- ~
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type Foo = {
read bar: number,
write baz: number,
}
Loading

0 comments on commit a26533e

Please sign in to comment.