-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Luau floor division (
//
) (#291)
- Loading branch information
1 parent
a07d208
commit a359e3a
Showing
8 changed files
with
339 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
173 changes: 173 additions & 0 deletions
173
full-moon/tests/roblox_cases/pass/floor_division/ast.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
--- | ||
source: full-moon/tests/pass_cases.rs | ||
expression: ast.nodes() | ||
--- | ||
stmts: | ||
- - LocalAssignment: | ||
local_token: | ||
leading_trivia: [] | ||
token: | ||
start_position: | ||
bytes: 0 | ||
line: 1 | ||
character: 1 | ||
end_position: | ||
bytes: 5 | ||
line: 1 | ||
character: 6 | ||
token_type: | ||
type: Symbol | ||
symbol: local | ||
trailing_trivia: | ||
- start_position: | ||
bytes: 5 | ||
line: 1 | ||
character: 6 | ||
end_position: | ||
bytes: 6 | ||
line: 1 | ||
character: 7 | ||
token_type: | ||
type: Whitespace | ||
characters: " " | ||
name_list: | ||
pairs: | ||
- End: | ||
leading_trivia: [] | ||
token: | ||
start_position: | ||
bytes: 6 | ||
line: 1 | ||
character: 7 | ||
end_position: | ||
bytes: 7 | ||
line: 1 | ||
character: 8 | ||
token_type: | ||
type: Identifier | ||
identifier: x | ||
trailing_trivia: | ||
- start_position: | ||
bytes: 7 | ||
line: 1 | ||
character: 8 | ||
end_position: | ||
bytes: 8 | ||
line: 1 | ||
character: 9 | ||
token_type: | ||
type: Whitespace | ||
characters: " " | ||
equal_token: | ||
leading_trivia: [] | ||
token: | ||
start_position: | ||
bytes: 8 | ||
line: 1 | ||
character: 9 | ||
end_position: | ||
bytes: 9 | ||
line: 1 | ||
character: 10 | ||
token_type: | ||
type: Symbol | ||
symbol: "=" | ||
trailing_trivia: | ||
- start_position: | ||
bytes: 9 | ||
line: 1 | ||
character: 10 | ||
end_position: | ||
bytes: 10 | ||
line: 1 | ||
character: 11 | ||
token_type: | ||
type: Whitespace | ||
characters: " " | ||
expr_list: | ||
pairs: | ||
- End: | ||
BinaryOperator: | ||
lhs: | ||
Number: | ||
leading_trivia: [] | ||
token: | ||
start_position: | ||
bytes: 10 | ||
line: 1 | ||
character: 11 | ||
end_position: | ||
bytes: 11 | ||
line: 1 | ||
character: 12 | ||
token_type: | ||
type: Number | ||
text: "1" | ||
trailing_trivia: | ||
- start_position: | ||
bytes: 11 | ||
line: 1 | ||
character: 12 | ||
end_position: | ||
bytes: 12 | ||
line: 1 | ||
character: 13 | ||
token_type: | ||
type: Whitespace | ||
characters: " " | ||
binop: | ||
DoubleSlash: | ||
leading_trivia: [] | ||
token: | ||
start_position: | ||
bytes: 12 | ||
line: 1 | ||
character: 13 | ||
end_position: | ||
bytes: 14 | ||
line: 1 | ||
character: 15 | ||
token_type: | ||
type: Symbol | ||
symbol: // | ||
trailing_trivia: | ||
- start_position: | ||
bytes: 14 | ||
line: 1 | ||
character: 15 | ||
end_position: | ||
bytes: 15 | ||
line: 1 | ||
character: 16 | ||
token_type: | ||
type: Whitespace | ||
characters: " " | ||
rhs: | ||
Number: | ||
leading_trivia: [] | ||
token: | ||
start_position: | ||
bytes: 15 | ||
line: 1 | ||
character: 16 | ||
end_position: | ||
bytes: 16 | ||
line: 1 | ||
character: 17 | ||
token_type: | ||
type: Number | ||
text: "2" | ||
trailing_trivia: | ||
- start_position: | ||
bytes: 16 | ||
line: 1 | ||
character: 17 | ||
end_position: | ||
bytes: 17 | ||
line: 1 | ||
character: 17 | ||
token_type: | ||
type: Whitespace | ||
characters: "\n" | ||
- ~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
local x = 1 // 2 |
Oops, something went wrong.