summaryrefslogtreecommitdiffstats
path: root/tests/snippets/julia/test_symbols.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snippets/julia/test_symbols.txt')
-rw-r--r--tests/snippets/julia/test_symbols.txt78
1 files changed, 78 insertions, 0 deletions
diff --git a/tests/snippets/julia/test_symbols.txt b/tests/snippets/julia/test_symbols.txt
new file mode 100644
index 0000000..37b4f83
--- /dev/null
+++ b/tests/snippets/julia/test_symbols.txt
@@ -0,0 +1,78 @@
+# Tests that symbols are parsed as special literals
+
+---input---
+:abc_123
+:abc_def
+:α
+Val{:mysymbol}
+
+# non-symbols
+a:b
+1:b
+1.:b
+a::T
+a<:T
+a>:T
+UInt(1):UInt(2)
+
+---tokens---
+':abc_123' Literal.String.Symbol
+'\n' Text.Whitespace
+
+':abc_def' Literal.String.Symbol
+'\n' Text.Whitespace
+
+':α' Literal.String.Symbol
+'\n' Text.Whitespace
+
+'Val' Keyword.Type
+'{' Punctuation
+':mysymbol' Literal.String.Symbol
+'}' Punctuation
+'\n' Text.Whitespace
+
+'\n' Text.Whitespace
+
+'# non-symbols' Comment
+'\n' Text.Whitespace
+
+'a' Name
+':' Operator
+'b' Name
+'\n' Text.Whitespace
+
+'1' Literal.Number.Integer
+':' Operator
+'b' Name
+'\n' Text.Whitespace
+
+'1.' Literal.Number.Float
+':' Operator
+'b' Name
+'\n' Text.Whitespace
+
+'a' Name
+'::' Operator
+'T' Keyword.Type
+'\n' Text.Whitespace
+
+'a' Keyword.Type
+'<:' Operator
+'T' Keyword.Type
+'\n' Text.Whitespace
+
+'a' Keyword.Type
+'>:' Operator
+'T' Keyword.Type
+'\n' Text.Whitespace
+
+'UInt' Keyword.Type
+'(' Punctuation
+'1' Literal.Number.Integer
+')' Punctuation
+':' Operator
+'UInt' Keyword.Type
+'(' Punctuation
+'2' Literal.Number.Integer
+')' Punctuation
+'\n' Text.Whitespace