summaryrefslogtreecommitdiff
path: root/tests/snippets/julia-repl
diff options
context:
space:
mode:
authorjmert <2965436+jmert@users.noreply.github.com>2021-03-05 01:31:42 -0600
committerGitHub <noreply@github.com>2021-03-05 08:31:42 +0100
commitffac8bde66a1060a255334ff4fb0aaf42b825eff (patch)
tree0f0b8a604346ed0437254b5dbb16ac4b3dfc4007 /tests/snippets/julia-repl
parentee89963c003089087d6ff7334e149a0bf99d6311 (diff)
downloadpygments-git-ffac8bde66a1060a255334ff4fb0aaf42b825eff.tar.gz
Update lists of operators/keywords in Julia and expand/refine highlighting (#1715)
* [julia] Update operators, keywords, and literal lists * [julia] Support symbol macros * [julia] Parse '..' operator juxtaposed with integers * [julia] Identify Symbol literals * [julia] Consume strings/commands faster & add triple-quoted command * [julia] Support identifying operators with custom suffixes * [julia] Add parsing for raw strings * [julia] Share definition of interpolation * [julia] Identify escaped ` and $ in commands * [julia] Support non-standard string and commmand literals with flags * [julia] Support variable names with interior exclamations * [julia] Fix matching floats starting with decimal * [julia] Compress nearly duplicate number matches with optional group * [julia] Match double-underscored float literal * [julia] Match hex float literals * [julia] Test more non-numerical literal expressions * [julia] Tag types in type contexts * [julia] Identify console via `julia-repl` as well * [julia] Be more conservative in identifying symbols * [julia] Update example file to v1.6 `base/strings/string.jl` * Address one CI failure * Switch to non-emoji Unicode category So example Hopefully fixes pypy3 CI failure * fixup: remove duplicate operators already in DOTTED_OPERATORS_LIST * [julia] Fix backslash operator * [julia] List `true`, `false` with builtin names, not keywords
Diffstat (limited to 'tests/snippets/julia-repl')
-rw-r--r--tests/snippets/julia-repl/test_repl.txt51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/snippets/julia-repl/test_repl.txt b/tests/snippets/julia-repl/test_repl.txt
new file mode 100644
index 00000000..798f0047
--- /dev/null
+++ b/tests/snippets/julia-repl/test_repl.txt
@@ -0,0 +1,51 @@
+Tests separating Julia's commands from output in REPL-like code blocks
+
+---input---
+julia> f(x) = sin(π/2x)
+f (generic function with 1 method)
+
+julia> @. f(1:2)
+2-element Vector{Float64}:
+ 1.0
+ 0.7071067811865475
+
+---tokens---
+'julia>' Generic.Prompt
+' ' Text
+'f' Name
+'(' Punctuation
+'x' Name
+')' Punctuation
+' ' Text
+'=' Operator
+' ' Text
+'sin' Name
+'(' Punctuation
+'π' Name.Builtin
+'/' Operator
+'2' Literal.Number.Integer
+'x' Name
+')' Punctuation
+'\n' Text
+
+'f (generic function with 1 method)\n' Generic.Output
+
+'\n' Generic.Output
+
+'julia>' Generic.Prompt
+' ' Text
+'@.' Name.Decorator
+' ' Text
+'f' Name
+'(' Punctuation
+'1' Literal.Number.Integer
+':' Operator
+'2' Literal.Number.Integer
+')' Punctuation
+'\n' Text
+
+'2-element Vector{Float64}:\n' Generic.Output
+
+' 1.0\n' Generic.Output
+
+' 0.7071067811865475\n' Generic.Output