-
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.
- Loading branch information
Showing
14 changed files
with
251 additions
and
62 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
43 changes: 43 additions & 0 deletions
43
...ler.UnitTests/parsing-snapshots/tests_macros_dbg-example-0.structured output.verified.txt
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,43 @@ | ||
ParsedFile | ||
[AnonModule | ||
([Expr (SyntaxMacroCall (SynMacroCall (SynSymbol dbg!, [Symbol (SynSymbol dbg!)], (8,1--8,5))), (8,0--8,6)); | ||
Expr | ||
(FunctionCall | ||
(Symbol (SynSymbol ignore), | ||
[SyntaxMacroCall | ||
(SynMacroCall | ||
(SynSymbol dbg!, | ||
[Symbol (SynSymbol dbg!); | ||
List | ||
(Paren, [Symbol (SynSymbol +); Const (Int32 1, (9,17--9,18)); Const (Int32 2, (9,19--9,20))], | ||
(9,14--9,21))], (9,9--9,21)))], (9,1--9,22)), (9,0--9,23)); | ||
Expr | ||
(FunctionCall | ||
(Symbol (SynSymbol ignore), | ||
[SyntaxMacroCall | ||
(SynMacroCall | ||
(SynSymbol dbg!, | ||
[Symbol (SynSymbol dbg!); | ||
List | ||
(ParenBar, | ||
[Const (Int32 1, (10,17--10,18)); Const (Int32 2, (10,19--10,20)); | ||
Const (Int32 3, (10,21--10,22))], (10,14--10,25))], (10,9--10,25)))], (10,1--10,26)), | ||
(10,0--10,27)); | ||
Expr | ||
(LetOrUse | ||
(Named (SynSymbol visp_result_todo, (11,0--11,22)), | ||
SyntaxMacroCall | ||
(SynMacroCall | ||
(SynSymbol dbg!, | ||
[Symbol (SynSymbol dbg!); Const (Int32 1, (11,6--11,7)); Const (Int32 2, (11,8--11,9)); | ||
Const (Int32 3, (11,10--11,11)); | ||
List | ||
(ParenBar, | ||
[Const (Int32 1, (11,14--11,15)); Const (Int32 2, (11,16--11,17)); | ||
Const (Int32 3, (11,18--11,19))], (11,12--11,21))], (11,1--11,21))), None, [], (11,0--11,22)), | ||
(11,0--11,22)); | ||
Expr | ||
(FunctionCall | ||
(Symbol (SynSymbol printfn), | ||
[Const (String ("%A", Regular, (11,0--11,22)), (11,0--11,22)); Symbol (SynSymbol visp_result_todo)], | ||
(11,0--11,22)), (11,0--11,22))], (8,0--11,22))] |
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
55 changes: 55 additions & 0 deletions
55
tests/Visp.Compiler.UnitTests/snapshots/tests_macros_dbg-example-0.can parse.verified.txt
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,55 @@ | ||
// This file is auto-generated | ||
|
||
#nowarn "0020" // unused results from functions | ||
|
||
open Visp.Runtime.Library | ||
|
||
let state = { Todo = () } | ||
// line 8 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i]" "dbg-example-0.visp" 8 | ||
// line 9 @"dbg-example-0.visp" | ||
ignore ( | ||
match 1 + | ||
2 with | ||
| tmp -> | ||
// line 9 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i] %s = %A" "dbg-example-0.visp" 9 "(+ 1 2)" tmp | ||
tmp) | ||
// line 10 @"dbg-example-0.visp" | ||
ignore ( | ||
match [1;2;3] with | ||
| tmp -> | ||
// line 10 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i] %s = %A" "dbg-example-0.visp" 10 "(|1 2 3|)" tmp | ||
tmp) | ||
// line 11 @"dbg-example-0.visp" | ||
let visp_result_todo = | ||
// line 11 @"dbg-example-0.visp" | ||
( | ||
match 1 with | ||
| tmp -> | ||
// line 11 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i] %s = %A" "dbg-example-0.visp" 11 "1" tmp | ||
tmp | ||
, | ||
match 2 with | ||
| tmp -> | ||
// line 11 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i] %s = %A" "dbg-example-0.visp" 11 "2" tmp | ||
tmp | ||
, | ||
match 3 with | ||
| tmp -> | ||
// line 11 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i] %s = %A" "dbg-example-0.visp" 11 "3" tmp | ||
tmp | ||
, | ||
match [1;2;3] with | ||
| tmp -> | ||
// line 11 @"dbg-example-0.visp" | ||
eprintfn "[%s:%i] %s = %A" "dbg-example-0.visp" 11 "(|1 2 3|)" tmp | ||
tmp | ||
) | ||
// line 11 @"dbg-example-0.visp" | ||
printfn "%A" visp_result_todo | ||
|
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
37 changes: 37 additions & 0 deletions
37
...Compiler.UnitTests/token-snapshots/tests_macros_dbg-example-0.returns tokens.verified.txt
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 @@ | ||
LPAREN Default 0 1 LParen | ||
MACRO_NAME "dbg!" TokenStream Macro 1 1 LParen | ||
RPAREN Default 0 0 Default | ||
LPAREN Default 0 1 LParen | ||
SYMBOL "ignore" Default 0 1 LParen | ||
LPAREN Default 0 2 LParen | ||
MACRO_NAME "dbg!" TokenStream Macro 1 2 LParen | ||
LPAREN TokenStream Macro 2 3 LParen | ||
SYMBOL "+" TokenStream Macro 2 3 LParen | ||
INT32 (1, false) TokenStream Macro 2 3 LParen | ||
INT32 (2, false) TokenStream Macro 2 3 LParen | ||
RPAREN TokenStream Macro 1 2 LParen | ||
RPAREN Default 0 1 LParen | ||
RPAREN Default 0 0 Default | ||
LPAREN Default 0 1 LParen | ||
SYMBOL "ignore" Default 0 1 LParen | ||
LPAREN Default 0 2 LParen | ||
MACRO_NAME "dbg!" TokenStream Macro 1 2 LParen | ||
PAREN_BAR TokenStream Macro 2 2 LParen | ||
INT32 (1, false) TokenStream Macro 2 2 LParen | ||
INT32 (2, false) TokenStream Macro 2 2 LParen | ||
INT32 (3, false) TokenStream Macro 2 2 LParen | ||
BAR_PAREN TokenStream Macro 1 2 LParen | ||
RPAREN Default 0 1 LParen | ||
RPAREN Default 0 0 Default | ||
LPAREN Default 0 1 LParen | ||
MACRO_NAME "dbg!" TokenStream Macro 1 1 LParen | ||
INT32 (1, false) TokenStream Macro 1 1 LParen | ||
INT32 (2, false) TokenStream Macro 1 1 LParen | ||
INT32 (3, false) TokenStream Macro 1 1 LParen | ||
PAREN_BAR TokenStream Macro 2 1 LParen | ||
INT32 (1, false) TokenStream Macro 2 1 LParen | ||
INT32 (2, false) TokenStream Macro 2 1 LParen | ||
INT32 (3, false) TokenStream Macro 2 1 LParen | ||
BAR_PAREN TokenStream Macro 1 1 LParen | ||
RPAREN Default 0 0 Default | ||
EOF Default 0 0 Default |
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
10 changes: 10 additions & 0 deletions
10
tests/Visp.ExecutionTests/snapshots/tests_macros_dbg-example-0.can execute.verified.txt
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,10 @@ | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:8] | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:9] (+ 1 2) = 3 | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:10] (|1 2 3|) = [1; 2; 3] | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:11] 1 = 1 | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:11] 2 = 2 | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:11] 3 = 3 | ||
[{SolutionDirectory}visp/tests/macros/dbg-example-0.visp:11] (|1 2 3|) = [1; 2; 3] | ||
(1, 2, 3, [1; 2; 3]) | ||
|
||
ExitCode: 0 |
14 changes: 7 additions & 7 deletions
14
tests/Visp.ExecutionTests/snapshots/tests_macros_stringify-0.can execute.verified.txt
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:27] | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:28] (+ 1 2) = 3 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:29] (|1 2 3|) = [1; 2; 3] | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:30] 1 = 1 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:30] 2 = 2 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:30] 3 = 3 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:30] (|1 2 3|) = [1; 2; 3] | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:24] | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:25] (+ 1 2) = 3 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:26] (|1 2 3|) = [1; 2; 3] | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:27] 1 = 1 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:27] 2 = 2 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:27] 3 = 3 | ||
[{SolutionDirectory}visp/tests/macros/stringify-0.visp:27] (|1 2 3|) = [1; 2; 3] | ||
(1, 2, 3, [1; 2; 3]) | ||
|
||
ExitCode: 0 |
Oops, something went wrong.