Commit graph

195 commits

Author SHA1 Message Date
arookas
53a50fb62c Added CreateCallSite
Similar to what I had before. Gonna be utility for sunFunctionCall.
2016-02-01 12:45:12 -05:00
arookas
d384899888 Made variables open relocations
This automatically makes it be able to detect if the variable is used at
all, as well, as HasRelocations will be false if none of these have
executed.
2016-02-01 12:39:30 -05:00
arookas
39617cbaf7 Fixed: leftover override 2016-02-01 12:38:12 -05:00
arookas
485c703f20 Made display and index writable 2016-02-01 12:33:25 -05:00
arookas
c3e358adba Moved call-site behavior to base class 2016-02-01 12:33:04 -05:00
arookas
436718ecf0 Added relocation types 2016-02-01 12:24:57 -05:00
arookas
8c655bb110 Changed WriteCALL functions
Changed sunPoint to a plain uint so one can manually place their own
dummy offset if needbe, without using the point system.
2016-02-01 12:20:55 -05:00
arookas
07646b11b3 Minor cleanup 2016-02-01 11:45:52 -05:00
arookas
8e093a98c7 Minor cleanup
Now it constructs the context and parser only once.
2016-02-01 06:30:32 -05:00
arookas
9373c59c44 Minor cleanup 2016-02-01 06:23:59 -05:00
arookas
f00b7c4296 Fixed: construct file instance with absolute path
Before it was set to the local name (from the import statement), and
then would fail because the code compares them to the full path later.
2016-02-01 06:23:31 -05:00
arookas
03fb7c20b4 Fixed: fully qualify the path 2016-02-01 06:21:01 -05:00
arookas
4d86f6449b Normalize path delimiters 2016-02-01 06:17:22 -05:00
arookas
bb28e47117 Fixed: const callables still flagged expressions as dynamic 2016-02-01 06:02:21 -05:00
arookas
4aebe57432 Fixed: return null instead of throwing an exception 2016-02-01 05:51:04 -05:00
arookas
5292b55078 Fixed: default kept state between compilations
I know having a property return an instance every call is not a good
design. I get it.
2016-02-01 05:48:12 -05:00
arookas
8246538bbb Ensure the seed is an integer 2016-02-01 05:44:29 -05:00
arookas
b71a38bb34 Fixed: use the current local number 2016-02-01 05:34:56 -05:00
arookas
7fca910e8e Fixed: variables were always declared global 2016-02-01 05:34:22 -05:00
arookas
b3a347936e Added modifier lists to AST 2016-02-01 05:03:44 -05:00
arookas
cf5915222e Removed casting builtin properties 2016-02-01 05:03:18 -05:00
arookas
ec2162f752 Fixed: incorrect indices 2016-02-01 05:03:02 -05:00
arookas
3e0a2dc403 Fixed: removed cast keywords 2016-02-01 04:57:29 -05:00
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