Commit graph

172 commits

Author SHA1 Message Date
arookas
25c3853309 Changed declare/define functions 2016-02-01 04:57:07 -05:00
arookas
6f74979d61 Gave sunIdentifier properties a consistent name 2016-02-01 04:56:22 -05:00
arookas
91588fae63 Fixed: builtins can't be local 2016-02-01 04:46:43 -05:00
arookas
f5af232ed4 Added modifier properties 2016-02-01 04:43:14 -05:00
arookas
780345863e Added return value to WriteJmp 2016-02-01 04:41:06 -05:00
arookas
f8a945b757 Removed spaces from file names 2016-02-01 04:37:15 -05:00
arookas
7157e79e78 Cleanup 2016-02-01 03:27:32 -05:00
arookas
4999467b29 Made the state variable local 2016-02-01 03:27:16 -05:00
arookas
723b8b64c9 Moved int/float/typeof to the standard library 2016-02-01 03:26:44 -05:00
arookas
be73c33069 Moved the statement keywords to the start of their respective modifiers productions 2016-02-01 03:25:47 -05:00
arookas
228dc80a01 Call AnalyzeExpression directly
Felt like saving a stack frame. Micro optimizations FTW
2016-02-01 03:10:21 -05:00
arookas
1842a99954 Added modifiers property 2016-02-01 03:08:35 -05:00
arookas
d070143fba Added local-keyword node 2016-02-01 01:40:30 -05:00
arookas
b57c70ee9d Added callable/storable modifiers to grammar
Still gotta add logic for them in the compiler.
2016-02-01 01:36:13 -05:00
arookas
5fa362cac1 Cache GetId result 2016-02-01 01:33:39 -05:00
arookas
837b2f8c8d Added null-check to GetId
Not the best fallback return value, but meh.
2016-02-01 01:32:09 -05:00
arookas
5483073347 Added local keyword 2016-02-01 01:28:00 -05:00
arookas
6f6306c064 Made try/catch release-only
This makes debugging a lot easier
2016-02-01 00:28:03 -05:00
arookas
9d6eb5a75c Renamed GetReader to CreateReader
I feel this better documents what is actually happening (i.e. the reader
is not a cached value and is instead generated per call).
2016-02-01 00:26:50 -05:00
arookas
ebfa60f9ba Cleanup 2016-02-01 00:25:49 -05:00
arookas
f2d46235ee Fixed: importing didn't increment context locals 2016-02-01 00:24:16 -05:00
arookas
c0e747d2bd Added local-scope for functions & script variables
Also moved name-mangling logic to its own function. Next, adding actual
support in the language.
2016-02-01 00:22:31 -05:00
arookas
32b716a3b9 Minor cleanup 2016-01-31 23:17:10 -05:00
arookas
e575a8a741 Refactored parameter/argument list productions
Now the ellipsis is validated at parse time directly in the grammar,
instead of in the sunParameterList constructor (possibly giving better
error messages). I was also able to remove the parameter/argument
transcient productions.
2016-01-31 23:13:09 -05:00
arookas
e57a55056b Tabbing 2016-01-31 21:32:41 -05:00
arookas
be3c2b1582 Removed useless header information 2016-01-31 21:31:43 -05:00
arookas
b0ad55a005 Changed how call sites are opened/closed.
Now builtin symbols also have call sites. I had to move the call-site
property out of the base class because builtins need to store
argument-count information as well.
2016-01-31 21:26:51 -05:00
arookas
b2330dfa6c Refactored break/continue compilation.
I didn't like the null overload usage. I might remove the overload
completely later.
2016-01-31 21:25:50 -05:00
arookas
eb3e679fc7 Complete overhaul of binary-writing system
- Merged sunWriter and binary-writing code from sunContext into
sunBinary
- Changed compilation functions to take sunCompiler instance instead of
a sunContext
- Completely removed links between context and binary
- Moved import logic to sunCompiler
- Made sunContext and sunBinary properties on sunCompiler so compilation
functions can access them
2016-01-31 20:03:12 -05:00
arookas
8f683d16a3 Moved system symbols to their own function 2016-01-31 14:57:08 -05:00
arookas
ca8f59dea2 Added RNG utility functions.
Intentionally did not import it in common.sun.
2016-01-31 14:32:36 -05:00
arookas
50348a9b47 Added SYS_SHINEGET and SYS_SHINENUM. 2016-01-31 14:29:41 -05:00
arookas
16cba6c798 Added position functions to sunWriter 2016-01-31 14:29:15 -05:00
arookas
6292c2f9c5 Added $switch system variable. 2016-01-29 21:56:49 -05:00
arookas
c87bad17d7 Added consume flags for loops
Obviously in preparation for switch statements.
2016-01-29 21:56:25 -05:00
arookas
758849cd17 Fixed: typo in builtin keyword 2016-01-29 21:54:25 -05:00
arookas
abd2bd5940 Added incSystemFlag and decSystemFlag. 2016-01-29 17:12:08 -05:00
arookas
35dc771a6d Added some system flag constants
Yea, I'll do more later...
2016-01-29 17:11:56 -05:00
arookas
2df6542eaf Added BGM constants 2016-01-29 17:11:27 -05:00
arookas
38633e742f Added more system builtins 2016-01-29 17:11:09 -05:00
arookas
a0cbd07a0f Added forceCloseTalk builtin 2016-01-29 17:10:48 -05:00
arookas
57ae25a57e Added sound-related builtins 2016-01-29 17:10:33 -05:00
arookas
d24894dd85 Added scene-related builtins 2016-01-29 17:10:04 -05:00
arookas
1824b97f98 Cleanup. 2016-01-29 17:08:55 -05:00
arookas
0a69d97dc3 Updated year in notice. 2016-01-29 17:07:55 -05:00
arookas
fcff623c29 Fixed: argument_list should not be transcient.
This caused errors in single-parameter function calls when expressions
had more than a single term.
2016-01-29 15:24:30 -05:00
arookas
7da7b611e0 Fixed: set mOutput, not mInput 2016-01-26 01:08:53 -05:00
arookas
e721b64045 Fixed: forgot to escape the n 2016-01-25 23:59:46 -05:00
arookas
1e8eb63f34 Fixed: write dest, not ofs 2016-01-23 01:36:27 -05:00
arookas
79e167da39 Fixed: var command didn't use WriteVar 2016-01-23 01:15:50 -05:00