summaryrefslogtreecommitdiffstats
path: root/tests/snippets/julia/test_macros.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snippets/julia/test_macros.txt')
-rw-r--r--tests/snippets/julia/test_macros.txt56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/snippets/julia/test_macros.txt b/tests/snippets/julia/test_macros.txt
new file mode 100644
index 0000000..43d67e0
--- /dev/null
+++ b/tests/snippets/julia/test_macros.txt
@@ -0,0 +1,56 @@
+# Test that macros are parsed, including ones which are defined as symbols
+
+---input---
+@generated function
+@. a + b
+@~ a + b
+@± a + b
+@mymacro(a, b)
+@+¹ᵀ a
+
+---tokens---
+'@generated' Name.Decorator
+' ' Text.Whitespace
+'function' Keyword
+'\n' Text.Whitespace
+
+'@.' Name.Decorator
+' ' Text.Whitespace
+'a' Name
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'b' Name
+'\n' Text.Whitespace
+
+'@~' Name.Decorator
+' ' Text.Whitespace
+'a' Name
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'b' Name
+'\n' Text.Whitespace
+
+'@±' Name.Decorator
+' ' Text.Whitespace
+'a' Name
+' ' Text.Whitespace
+'+' Operator
+' ' Text.Whitespace
+'b' Name
+'\n' Text.Whitespace
+
+'@mymacro' Name.Decorator
+'(' Punctuation
+'a' Name
+',' Punctuation
+' ' Text.Whitespace
+'b' Name
+')' Punctuation
+'\n' Text.Whitespace
+
+'@+¹ᵀ' Name.Decorator
+' ' Text.Whitespace
+'a' Name
+'\n' Text.Whitespace