mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 13:32:24 +00:00
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
|
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.Whitespace
|
||
|
'f' Name
|
||
|
'(' Punctuation
|
||
|
'x' Name
|
||
|
')' Punctuation
|
||
|
' ' Text.Whitespace
|
||
|
'=' Operator
|
||
|
' ' Text.Whitespace
|
||
|
'sin' Name
|
||
|
'(' Punctuation
|
||
|
'π' Name.Builtin
|
||
|
'/' Operator
|
||
|
'2' Literal.Number.Integer
|
||
|
'x' Name
|
||
|
')' Punctuation
|
||
|
'\n' Text.Whitespace
|
||
|
|
||
|
'f (generic function with 1 method)\n' Generic.Output
|
||
|
|
||
|
'\n' Generic.Output
|
||
|
|
||
|
'julia>' Generic.Prompt
|
||
|
' ' Text.Whitespace
|
||
|
'@.' Name.Decorator
|
||
|
' ' Text.Whitespace
|
||
|
'f' Name
|
||
|
'(' Punctuation
|
||
|
'1' Literal.Number.Integer
|
||
|
':' Operator
|
||
|
'2' Literal.Number.Integer
|
||
|
')' Punctuation
|
||
|
'\n' Text.Whitespace
|
||
|
|
||
|
'2-element Vector{Float64}:\n' Generic.Output
|
||
|
|
||
|
' 1.0\n' Generic.Output
|
||
|
|
||
|
' 0.7071067811865475\n' Generic.Output
|