-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🧪 Breakdown test cases and add todos (#20)
* chore: move test files into subdirectories * chore: first pass test run through * feat: add hex constants * chore: add todos * chore: regen snapshots
- Loading branch information
Showing
37 changed files
with
1,173 additions
and
619 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
File renamed without changes.
File renamed without changes.
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
3 changes: 3 additions & 0 deletions
3
tests/embedded.just.snap → tests/embedded/embedded.just.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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
25 changes: 25 additions & 0 deletions
25
tests/builtins.just.snap → tests/general/builtins.just.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
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,8 @@ | ||
# Constants | ||
|
||
true | ||
false | ||
|
||
HEX | ||
HEXLOWER | ||
HEXUPPER |
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,15 @@ | ||
># Constants | ||
#^^^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
>true | ||
#^^^^ source.just constant.language.boolean.just | ||
>false | ||
#^^^^^ source.just constant.language.boolean.just | ||
> | ||
>HEX | ||
#^^^ source.just constant.language.hex.just | ||
>HEXLOWER | ||
#^^^^^^^^ source.just constant.language.hex.just | ||
>HEXUPPER | ||
#^^^^^^^^ source.just constant.language.hex.just | ||
> |
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,17 @@ | ||
# Comments | ||
|
||
# Standard comment | ||
|
||
something # Comment after code | ||
|
||
# Numbers | ||
|
||
123 | ||
# TODO: should the "." be colored differently? | ||
123.456 | ||
|
||
# Imports | ||
|
||
import 'foo/bar.just' | ||
|
||
mod bar |
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,37 @@ | ||
># Comments | ||
#^^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
># Standard comment | ||
#^^^^^^^^^^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
>something # Comment after code | ||
#^^^^^^^^^^ source.just | ||
# ^^^^^^^^^^^^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
># Numbers | ||
#^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
>123 | ||
#^^^ source.just constant.language.integer.just | ||
># TODO: should the "." be colored differently? | ||
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.just comment.line.number-sign.just | ||
>123.456 | ||
#^^^ source.just constant.language.integer.just | ||
# ^ source.just | ||
# ^^^ source.just constant.language.integer.just | ||
> | ||
># Imports | ||
#^^^^^^^^^ source.just comment.line.number-sign.just | ||
> | ||
>import 'foo/bar.just' | ||
#^^^^^^ source.just keyword.other.reserved.just | ||
# ^ source.just | ||
# ^ source.just string.quoted.single.just string.quoted.single.just | ||
# ^^^^^^^^^^^^ source.just string.quoted.single.just | ||
# ^ source.just string.quoted.single.just | ||
> | ||
>mod bar | ||
#^^^ source.just keyword.other.reserved.just | ||
# ^ source.just | ||
# ^^^^ source.just | ||
> |
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,63 @@ | ||
# Multi-line constructs | ||
|
||
# TODO: do we need to validate this? | ||
# TODO: should just-specific highlighting in recipes be conditional (ex. only in interpolation blocks) | ||
# or always on? | ||
|
||
multi-line-recipe: | ||
if true; then \ | ||
echo 'True!'; \ | ||
fi | ||
|
||
|
||
# Parenthesis blocks don't need explicit line breaks | ||
|
||
abc := ('a' + | ||
'b' | ||
+ 'c') | ||
|
||
abc2 := ( | ||
'a' + | ||
'b' + | ||
'c' | ||
) | ||
|
||
# TODO: multi-line recipe def broken | ||
|
||
foo param=('foo' | ||
+ 'bar' | ||
): | ||
echo {{param}} | ||
|
||
bar: (foo | ||
'Foo' | ||
) | ||
echo 'Bar!' | ||
|
||
# Backslash continues as if whitespace | ||
|
||
a := 'foo' + \ | ||
'bar' | ||
|
||
foo param1 \ | ||
param2='foo' \ | ||
*varparam='': dep1 \ | ||
(dep2 'foo') | ||
echo {{param1}} {{param2}} {{varparam}} | ||
|
||
dep1: \ | ||
# this comment is not part of the recipe body | ||
echo 'dep1' | ||
|
||
dep2 \ | ||
param: | ||
echo 'Dependency with parameter {{param}}' | ||
|
||
# Line continuation in interpolations | ||
|
||
recipe: | ||
echo '{{ \ | ||
"This interpolation " + \ | ||
"has a lot of text." \ | ||
}}' | ||
echo 'back to recipe body' |
Oops, something went wrong.