| 1 |
Tests separating Julia's commands from output in REPL-like code blocks |
| 2 |
|
| 3 |
---input--- |
| 4 |
julia> f(x) = sin(π/2x) |
| 5 |
f (generic function with 1 method) |
| 6 |
|
| 7 |
julia> @. f(1:2) |
| 8 |
2-element Vector{Float64}: |
| 9 |
1.0 |
| 10 |
0.7071067811865475 |
| 11 |
|
| 12 |
---tokens--- |
| 13 |
'julia>' Generic.Prompt |
| 14 |
' ' Text.Whitespace |
| 15 |
'f' Name |
| 16 |
'(' Punctuation |
| 17 |
'x' Name |
| 18 |
')' Punctuation |
| 19 |
' ' Text.Whitespace |
| 20 |
'=' Operator |
| 21 |
' ' Text.Whitespace |
| 22 |
'sin' Name |
| 23 |
'(' Punctuation |
| 24 |
'π' Name.Builtin |
| 25 |
'/' Operator |
| 26 |
'2' Literal.Number.Integer |
| 27 |
'x' Name |
| 28 |
')' Punctuation |
| 29 |
'\n' Text.Whitespace |
| 30 |
|
| 31 |
'f (generic function with 1 method)\n' Generic.Output |
| 32 |
|
| 33 |
'\n' Generic.Output |
| 34 |
|
| 35 |
'julia>' Generic.Prompt |
| 36 |
' ' Text.Whitespace |
| 37 |
'@.' Name.Decorator |
| 38 |
' ' Text.Whitespace |
| 39 |
'f' Name |
| 40 |
'(' Punctuation |
| 41 |
'1' Literal.Number.Integer |
| 42 |
':' Operator |
| 43 |
'2' Literal.Number.Integer |
| 44 |
')' Punctuation |
| 45 |
'\n' Text.Whitespace |
| 46 |
|
| 47 |
'2-element Vector{Float64}:\n' Generic.Output |
| 48 |
|
| 49 |
' 1.0\n' Generic.Output |
| 50 |
|
| 51 |
' 0.7071067811865475\n' Generic.Output |