mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Implicitly call references like functions
This commit is contained in:
parent
95462391e3
commit
1263c32572
9 changed files with 505 additions and 73 deletions
61
test/tests/implicit call of references.ans
Normal file
61
test/tests/implicit call of references.ans
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
Function with argument:
|
||||
|
||||
$ f(x)
|
||||
|
||||
{&f}
|
||||
|
||||
Function without argument:
|
||||
|
||||
$ a
|
||||
lol
|
||||
$ b
|
||||
hihi
|
||||
|
||||
a: {a}
|
||||
|
||||
&a: {&a}
|
||||
|
||||
:ref = &a
|
||||
|
||||
&ref: {&ref}
|
||||
|
||||
&&&ref: {&&&ref}
|
||||
|
||||
ref: {ref}
|
||||
|
||||
ref.b: {ref.b}
|
||||
|
||||
ref.b!: {ref.b!}
|
||||
|
||||
ref.b(): {ref.b()}
|
||||
|
||||
&ref.b: {&ref.b}
|
||||
|
||||
&ref.b!: {&ref.b!}
|
||||
|
||||
&ref.b(): {&ref.b()}
|
||||
|
||||
&ref!: {&ref!}
|
||||
|
||||
Objects:
|
||||
|
||||
% A
|
||||
$ b
|
||||
KK
|
||||
@1
|
||||
|
||||
&A: {&A}
|
||||
|
||||
:ref A = &A
|
||||
|
||||
ref A: {ref A}
|
||||
|
||||
&ref A: {&ref A}
|
||||
|
||||
A.b: {A.b}
|
||||
|
||||
&A.b: {&A.b}
|
||||
|
||||
\(&A).b: {(&A).b}
|
||||
|
||||
&(&A).b: {&(&A).b}
|
||||
Loading…
Add table
Add a link
Reference in a new issue