-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.pashm
115 lines (88 loc) · 1.39 KB
/
test.pashm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# test comment
$hello = "Hello, World!\n"
print($hello) # hi there
func hello(string $name)
return 'hello ' + $name
endfunc
if null is None
endif
println int, string, str, integer, bool, list, array, float, tuple, dict
'hello' + "hello"
@doc "hello world"
class Person
func string::get_name()
return $this->name
endfunc
endclass
println Person->__docstring__
if True, null, false, False, true, None
# something
else
elif
endif
# TODO : FIXME
import @foo
import @foo.bar
import 'something'
import_once 'something'
import_run 'something'
import_run_once 'something'
raise Error('Foo', 'bar')
namespace foo
ns bar
endns
endnamespace
use foo
print('something')
println('something')
printl('something')
perror('something')
printf('something')
define()
is_defined()
redefine()
all_defines()
undefine()
println clone($something)
get()
set()
gget()
gset()
section something
goto something
mem true; gotoif something
assert true
break
continue
pass
if and or not in
endif
register_shutdown()
python('foo')
eval('foo')
py_load_file()
py_load_module()
println 'hello \' and \" bye' + 'other str'
out_start()
out_end()
out_clean()
out_get_clean()
out_get()
func.delete()
func.exists()
func.list()
class.delete()
class.exists()
class.list()
var_dump()
die()
system('ls')
isset('foo')
read()
exit()
typeof($var)
__namespace__()
match()
println """hello"""
$name.other = 'hello'
println 'the # comment'