leaf corcoran
43c1e0a4fb
allow string literal as table key
2012-09-08 18:40:15 -07:00
leaf corcoran
bc13b1b8cc
add inherited callback to classes
2012-09-08 18:08:54 -07:00
leaf corcoran
a750523d10
hoist name declarations from statements inside of a class to the top of the class body
2012-09-07 20:20:34 -07:00
leaf corcoran
290b73f92b
differentiate between table key literals and variable references #42
2012-09-07 18:51:19 -07:00
leaf corcoran
b170172465
wrap update expressions in parentheses if passed an expression #43
2012-09-07 16:41:19 -07:00
leaf corcoran
d3170a018d
support full syntax of generic for loop #41
2012-08-12 00:58:35 -07:00
leaf corcoran
c93e2d35f5
fixed regression, assign allowed in class decl again
2012-01-22 11:50:30 -08:00
leaf corcoran
16f4c956bf
unless line decorator
2012-01-13 21:48:07 -08:00
leaf corcoran
bf416dbb1c
remove empty return statement at end of fndef ( #20 )
2012-01-13 21:24:46 -08:00
leaf corcoran
1ef297349a
updated test
2012-01-11 20:39:09 -08:00
leaf corcoran
5933b733ba
assigning class variables with @ property names
2012-01-08 23:10:25 -08:00
leaf corcoran
cd240444de
updated test
2012-01-08 22:24:58 -08:00
leaf corcoran
53f587021d
support for indented unbound tables as last argument to function calls
2011-12-08 22:44:07 -08:00
leaf corcoran
d1059b8f98
class level inheritance, changed class representation slightly
...
Looking up a class property will now search the parent class properties
if parent exists
Classes have a few more built in properties:
* __name holds the name of the class as it was defined as a string
* __base holds the instance metatable as it was defined (not dynamic)
* __parent holds the class's parent class if it exists (not dynamic)
The way class inheritance is handled was CHANGED (uses __base instead of
looking at __index of parents metatable). Make sure you recompile all
your code if using class inheritance because old classes won't work with
new ones.
2011-12-03 19:17:06 -08:00
leaf corcoran
0d232f98e7
super tests, fixed regression when compiling chain dot args
2011-12-03 10:44:41 -08:00
leaf corcoran
5c999fb680
colon_stub
on super will pass self as receiver
2011-12-03 10:39:03 -08:00
leaf corcoran
fc72baf423
calling function of super with \ uses self instead of class as first arg
2011-12-02 20:37:47 -08:00
leaf corcoran
6a07d50277
fixed super dot access, made super available as a value
2011-12-02 20:07:42 -08:00
leaf corcoran
02a5dbcdd1
fix compile failure when comprehension exp has no value
2011-11-19 13:03:51 -08:00
leaf corcoran
3f6c1d517e
switch tests, parse switch non-cascade expression
2011-11-18 19:07:17 -08:00
leaf corcoran
636c24258f
added key,value table comprehensions
2011-11-17 20:34:16 -08:00
leaf corcoran
5d9851b8cd
export keyword works before class declaration, fixed export test
2011-11-06 22:48:25 -08:00
leaf corcoran
374a7c5975
can export assignment statements
2011-11-06 22:29:39 -08:00
leaf corcoran
de3372d96e
import done through transform, binding import also works now
2011-11-06 22:06:39 -08:00
leaf corcoran
5cdbb68503
rebuilt tests
2011-11-06 15:44:40 -08:00
leaf corcoran
c3fd7812ce
fixed with's dot chain from not parsing all types after first chain item
2011-11-01 19:56:29 -07:00
leaf corcoran
a2f9ca0743
vararg bubbling works for block_exp
2011-10-12 21:03:55 -07:00
leaf corcoran
d43f0f5a9c
moved unpack foreach to transform, removed do end from output
2011-10-10 00:24:16 -07:00
leaf corcoran
0131786390
varargs bubbling moved to block_exp
2011-10-09 15:58:39 -07:00
leaf corcoran
7f55485e62
tests for special export symbols
2011-10-09 02:00:25 -07:00
leaf corcoran
5d76a8d741
fixed bug with class value declaring
2011-10-01 22:35:34 -07:00
leaf corcoran
3fb8682f96
moved class from compiler to tree transformation
2011-10-01 22:35:34 -07:00
leaf corcoran
b7af08f15f
function stub syntax, and start of tree transformer
2011-10-01 11:46:47 -07:00
leaf corcoran
6fae81994c
support return statement with no arguments
2011-09-30 23:23:22 -07:00
leaf corcoran
319d387c72
fixed parse error with some keywords at start of variable names
2011-09-30 20:20:36 -07:00
leaf corcoran
6c391cb572
fixed "\\" from not parsing
2011-09-11 23:36:01 -07:00
leaf corcoran
d0a92fb1db
self args can be in any function, default value for self args works
2011-09-11 23:18:05 -07:00
leaf corcoran
f2ce353b4c
added :
prefix operator for self assignment in table lits
2011-08-28 23:41:24 -07:00
leaf corcoran
24ae69cfdf
fixed bug with comments failing to parse in open tables
2011-08-28 23:19:48 -07:00
leaf corcoran
20548ecd70
..= for string concatenation update
2011-08-20 10:44:08 -07:00
leaf corcoran
d75c2b04ff
arguments can be continued on next line with indent
...
+ some parsing cleanups
2011-08-20 10:38:40 -07:00
leaf corcoran
faf21dd805
keep track of accumulator size instead of using length operator
...
should be faster
2011-08-13 19:19:17 -07:00
leaf corcoran
a76c251899
don't use table.insert to append to table
2011-08-13 11:20:10 -07:00
leaf corcoran
05b3a8f989
fixed number literals (all lua ones supported)
...
integer, float and hex
2011-08-12 19:35:22 -07:00
leaf corcoran
f1ec1ae321
fix updated test
2011-07-27 22:35:45 -07:00
leaf corcoran
472c107786
fixed parse error for empty lines before else/elseif
2011-07-22 19:21:12 -07:00
leaf corcoran
1ea8f3fb6f
for loops and while statements as expressions
2011-07-16 17:14:57 -07:00
leaf corcoran
9c000857fc
proper return statement + with expression
2011-07-16 13:19:41 -07:00
leaf corcoran
4e9227417d
default function args
2011-07-16 11:00:39 -07:00
leaf corcoran
1ae3e4e4cc
standalone for in loop
2011-07-14 23:46:16 -07:00
leaf corcoran
4634b76ad0
temporary comprehension values don't leak
2011-07-14 23:25:30 -07:00
leaf corcoran
ba29e159b5
tests pass, fixed some bug
2011-07-14 00:02:07 -07:00
leaf corcoran
a80f8f875e
instances store class in __class
2011-07-04 11:40:20 -07:00
leaf corcoran
361feef825
slice shorthand for unpacked list comprehension
2011-06-23 08:42:43 -07:00
leaf corcoran
b4df97d2d6
with statement
2011-06-21 19:43:01 -07:00
leaf corcoran
96abc5986e
bang function call
2011-06-20 20:35:05 -07:00
leaf corcoran
17184f2aa8
unary minus must not have any whitespace after it
...
avoids precedence ambiguity between minus with fncall
2011-06-20 08:28:25 -07:00
leaf corcoran
2fb3b4f9d2
table keys can be reserved words
2011-06-19 13:00:27 -07:00
leaf corcoran
27836f1d80
super for classes, synthesized init calls super
2011-06-19 12:07:01 -07:00
leaf corcoran
67a59a9622
class inheritance
2011-06-15 22:41:17 -07:00
leaf corcoran
65fdf7e6b2
new class system
2011-06-15 08:52:01 -07:00
leaf corcoran
858608a04d
basic class syntax
2011-06-14 23:13:33 -07:00
leaf corcoran
64312e48cf
rebuilt syntax test
2011-06-13 08:44:17 -07:00
leaf corcoran
a873203469
numeric for loops
2011-06-13 08:42:46 -07:00
leaf corcoran
133c9b058d
binary assignment operator shorthand + misc
2011-06-13 08:23:09 -07:00
leaf corcoran
f5c5e9fde3
fully moonspeak compiler
2011-06-12 22:38:42 -07:00
leaf corcoran
b9e8b3014d
local declared before fndef to allow recursion
2011-06-02 20:55:33 -07:00
leaf corcoran
5e99633efc
added support for colon open function calls
2011-06-01 23:27:19 -07:00
leaf corcoran
72eca8071c
chains can implicitly return
2011-06-01 21:11:03 -07:00
leaf corcoran
9c0fced067
syntax for table array iteration
2011-06-01 20:58:17 -07:00
leaf corcoran
233738aad2
assignable if, exp list as statement, ; as value separator
2011-05-29 22:38:47 -07:00
leaf corcoran
2e8c33ad23
new assign compile
2011-05-29 16:25:52 -07:00
leaf corcoran
d8ff74ccba
comprehension decorator, non return value compile for comprehension
2011-05-29 14:47:42 -07:00
leaf corcoran
ee63375705
compile funcs use pretty to output when possible
2011-05-28 18:36:19 -07:00
leaf corcoran
75b834bbe5
implicity return for some types, temp storage for unary expressions
2011-05-28 16:45:59 -07:00
leaf corcoran
0babe3ad55
if statement decorator, unary ops, ... keyword
2011-05-28 00:21:25 -07:00
leaf corcoran
708e0dd35f
exteneded list comprehension
2011-05-27 23:21:29 -07:00
leaf corcoran
1f821c19d4
list comprehension, self operator, all binary ops
2011-05-27 21:27:59 -07:00
leaf corcoran
ba0c504fa4
colon and dot operators
2011-05-23 23:58:10 -07:00
leaf corcoran
06693fbd66
import statement, and some docs
2011-05-23 22:43:40 -07:00
leaf corcoran
c70b298b68
conds and while
2011-05-23 01:16:49 -07:00
leaf corcoran
1cb205608a
more tables
2011-05-22 22:12:21 -07:00
leaf corcoran
66b20ef1ce
some table syntax, fixed tests
2011-05-22 19:47:25 -07:00
leaf corcoran
5c2f5b0e0d
amgibuity fix, parens, and some comment support
2011-05-22 12:19:13 -07:00
leaf corcoran
6e0927f55d
strings
2011-05-22 00:58:17 -07:00
leaf corcoran
4d489581ba
assignment and scoping functional
2011-05-21 22:15:19 -07:00
leaf corcoran
4936446f1c
funcall and indexing is good
2011-05-21 15:26:46 -07:00
leaf corcoran
f1e90fc24d
testing framework
2011-05-20 09:14:50 -07:00