Better macros #113

Merged
merged 144 commits into from Jul 14, 2011

1 participant

@vito
Owner

No description provided.

Alex Suraci added some commits May 27, 2011
Alex Suraci disable most of the kernel for now 0019055
Alex Suraci early work on new expansion/registering mechanism 784e1d2
Alex Suraci fail if Atomy::namespaced is called with an empty name cd2c04a
Alex Suraci debugging cleanup 3858356
Alex Suraci get message-send macros going by allowing unquotes as the message nam…
…e and defining a catch-all variable message macro
8e2e328
Alex Suraci remove now-unused macro expansion code ec09fa4
Alex Suraci add to the front of the method list if #<=> is not defined 24005b6
Alex Suraci continuously expand until the result doesn't change, plus minor cleanups 1c22ada
Alex Suraci change Send#macro_pattern to not mutate itself cfd3ea9
Alex Suraci fail if compiling a send without a message name 5cdbf21
Alex Suraci add basic syntax to kernel boot 05eb3eb
Alex Suraci correct macro(foo(bar)) { ... } to match anything as the receiver, ra…
…ther than self
012b68a
Alex Suraci temporary debugging help for runtime evaluation 638c0c7
Alex Suraci woops, macro(foo(bar)) { ... } should match 'self for the receiver 707ffeb
Alex Suraci handle chained send macro patterns and block capturing 2fde37f
Alex Suraci use *foo to indicate splice unquotes in a macro pattern 6c77256
Alex Suraci remove macro block special-cases 616a354
Alex Suraci update define node to not pass is_macro (now removed) 43e5091
Alex Suraci get proper context for splice unquote patterns 04a6ad6
Alex Suraci add #[] macro d1302bb
Alex Suraci enable import macro 0a59d2d
Alex Suraci accept file/line info in #add_method and #define_method, accept visib…
…ility info in #define_method
fa7e5e0
Alex Suraci correct checking for block-pass in macro pattern 088c993
Alex Suraci pass some file/line info along when adding macro method 2aa4184
Alex Suraci add more info for the default file to aid debugging 91f823b
Alex Suraci correct definition add_method call 92c7fc7
Alex Suraci fix block-pass macro pattern detection again b72e199
Alex Suraci fix const_from_string usage in Literal/Match patterns b652c96
Alex Suraci update $ cosmetics to a macro 55a47aa
Alex Suraci macros go in Atomy::AST StaticScope, and correct proc-arg-with-args m…
…acros
21d8d06
Alex Suraci expand a definition's pattern ef949a4
Alex Suraci retain a macro's definition location 74173e8
Alex Suraci add Node#children which is like #recursively but only goes down 1 lev…
…el, and only acts on the immediate children (not on the node itself)
ed11009
Alex Suraci chained unary send macros 08ae2dd
Alex Suraci update the data kernel cfbe318
Alex Suraci load some of the kernels (more to come soon) 405b351
Alex Suraci remove unnecessary constant qualifiers now that Atomy::AST is macro s…
…tatic scope
dab8f89
Alex Suraci define the singleton class/subclass macros after the more general one 1504a86
Alex Suraci more Atomy::AST:: removal 81d6763
Alex Suraci load & cleanup comparison kernel f9f1ce9
Alex Suraci reorder #evaluate-when 716c065
Alex Suraci update #for-macro e33b31e
Alex Suraci move #names to NodeLike so macros can use it 5435573
Alex Suraci default CodeLoader::compiling to :macro 2e7aaa0
Alex Suraci improve dummy repl backtraces 97e492e
Alex Suraci send #expand to the result of an expansion, rather than conditionally…
… recursing
cddb78d
Alex Suraci always #unshift as the catch-all in #insert-method 1d21295
Alex Suraci update conditional macros 256c18d
Alex Suraci get macro-quotes working again 1c8d342
Alex Suraci correct #send_chain to check if the message is a block rather than te…
…sting #block
23da665
Alex Suraci better error message for compiling a send with no method name set 83c320c
Alex Suraci load more kernels 630a603
Alex Suraci for-macro now defines in Atomy::Macro::Helpers, which is mixed in to …
…Node
f90988d
Alex Suraci macro-quoting system refactoring; macro-quoters are evaluated like ma…
…cros, with the MacroQuote as self
f86039e
Alex Suraci catch attempts to register a blank symbol 7a79750
Alex Suraci add Node#walk_with, and change Node#children to return an array if no…
… block given
efd51c4
Alex Suraci expand the lhs of a definition in the macro ec9a697
Alex Suraci remove #expandable?, call #resolve before expansion 071392f
Alex Suraci a Send's namespace symbol is its message's namespace symbol 8c8b361
Alex Suraci only register a macro if it can get a namespace symbol e2e544b
Alex Suraci keep an eye on this little fella 5ec1804
Alex Suraci implement quasiquote pattern precision comparison 3fc29ac
Alex Suraci for now, entirely sort the method branches on every definition 1276cc9
Alex Suraci more Atomy::AST:: purging 69928f0
Alex Suraci reimplement let-macro 7062583
Alex Suraci update hash macro (#[]) 9705242
Alex Suraci handle `foo $ bar, ...` 1d02de1
Alex Suraci update #labels macro fb6b3e9
Alex Suraci remove all #as_message definitions ae663d8
Alex Suraci remove more Atomy::AST:: d8487a4
Alex Suraci refactor args + block macros 9734717
Alex Suraci add constant-message macros 931d918
Alex Suraci change $ macro to not mutate ca7e38d
Alex Suraci woops; fix lib/ast/block bf8894f
Alex Suraci update particle macros 50e1b7f
Alex Suraci move #names to Helpers c00d788
Alex Suraci remove #as_message from NodeLike 6bdaba5
Alex Suraci add default values for Operator node's associativity/precedence d90a6de
Alex Suraci update various macros to no longer use &foo style for would-be proc-args 405a571
Alex Suraci correct dummy repl's pretty-printing 5c8f184
Alex Suraci yet more macro updates to replace &foo block node capturing 4f876a1
Alex Suraci stricter size checking for quasiquotation patterns matching nodes wit…
…h multiple children, e.g. lists/args (+ splice unquote semantics)
b90783c
Alex Suraci include slots in Node#to_sexp d83e360
Alex Suraci correct Column/Nesting #to_sexp 5f9a424
Alex Suraci update #section doc macro, remove &foo style and use a gensym f8e44f0
Alex Suraci correct Or pattern constructor; don't have hash macro yet 8a9b316
Alex Suraci update quasiquotation pattern precision comparison to count nil/non-n…
…il values when they differ, and remove "bottom" test
10d3548
Alex Suraci cleanups 740049c
Alex Suraci for consistency, ensure the namespace result of Atomy::from_namespace…
…d is nil rather than false
19262eb
Alex Suraci perform sanity checking in generated node constructors to catch error…
…s much sooner
395ef6f
Alex Suraci terminology! 4616a96
Alex Suraci properly register/define macros on when_load/when_run 55b3fd7
Alex Suraci don't recursively resolve through quotes/quasiquotes ae12b23
Alex Suraci use insertion-based method registering as soon as we have <=> 34a443d
Alex Suraci add #variable macro helper a988b94
Alex Suraci resolve nodes as _ if there's no namespace 438133f
Alex Suraci don't expand nodes before attempting conversion to a pattern cfb7ca8
Alex Suraci for now, resolve macro/definition bodies on definition ec29942
Alex Suraci split Send into Compose and Send; Compose is the syntactic form, Send…
… is what it commonly expands to

also includes:
* updates for most/all kernel macros
* call #to_node on expansion results before calling #expand again
* get the REPL booting up at least

normally those would be separate commits, but they're are all interrelated
9cb85bf
Alex Suraci implement particle patterns 5d86bc9
Alex Suraci improve error reporting for initializing a "many" sub-node with non-h…
…omogenously-Node elements
2febde0
Alex Suraci correct value attribute for Number formatting node to be optional 77071f6
Alex Suraci register namespaces on run too 2c79af8
Alex Suraci update #let macro usage in pretty kernel 69e722a
Alex Suraci turn #should into a macro for better error reporting 0fec252
Alex Suraci tweak pseudo-local name mangling to prevent conflict with gensyms 4c15e2e
Alex Suraci correct let-macro expansion to call #expand rather than #expand on th…
…e result, to follow through the new node's `let's
d3603c9
Alex Suraci expand first, then resolve 9ac333d
Alex Suraci minor tweak for Variable#namespace_symbol 17b281c
Alex Suraci expand and resolve definition and macro bodies before inserting them …
…in the class and before compilation
e124583
Alex Suraci won't be needing that anymore 99d570e
Alex Suraci add #super macros for different calling cases 8aa59ab
Alex Suraci lib/macro cleanups 0cbd710
Alex Suraci sort longer argument lengths as higher precision 3a61d9d
Alex Suraci split defintion argument length precision test into two 10d90f8
Alex Suraci cleanup a0e4def
Alex Suraci clean up kernel boot list 958c7fd
Alex Suraci turn true, false, nil, and self into macros 2e218a8
Alex Suraci set line information in Macro#bytecode e6a1294
Alex Suraci move Send node to lib/ast/internal 2b771fb
Alex Suraci add Compose pretty-printing 3a2e518
Alex Suraci Compose#macro_pattern cleanups 69e4667
Alex Suraci correct inconsistencies with chained compose macro-patterns 74c953b
Alex Suraci update a few macros patterns 35617f7
Alex Suraci reimplement let-macro to just use evaluate-when, so it doesn't have t…
…o redefine the macros on every compilation
b4b7907
Alex Suraci correct Constant patterns failing during construction if their consta…
…nts aren't defined yet (this big blob is basically `defined? Foo`)
be96de8
Alex Suraci tweak Unary#pattern e669355
Alex Suraci update patterns to prepare the nodes they contain, and update various…
… nodes to pre-convert to patterns
0d2e1ab
Alex Suraci update Compose#macro_pattern and Unary#macro_pattern b520c5e
Alex Suraci support passing a binding to Node#evaluate 8c1a568
Alex Suraci experiment with better macroexpansion error reporting fc8a625
Alex Suraci add Node#resolve_all, which will recursively resolve a node, replacin…
…g resolves to _ if possible
459142b
Alex Suraci refactor Atomy.namespaced to take a splat arg 0ca693c
Alex Suraci macroexpand at compile-time rather than run-time 96ac033
Alex Suraci update macros + for-macro test 88943e7
Alex Suraci remove pattern-matching + macros tests. not doing that anymore. 77466f0
Alex Suraci update Define pretty-printing, add BlockBody pretty-printing 48b0a09
Alex Suraci updates for rbx 2.0.0pre c0debd0
Alex Suraci update and regenerate kpeg parser for latest version 6b3a118
Alex Suraci add -x command-line flag for disabling the kernel, mostly for parser …
…testing, and add modeline
a667c69
Alex Suraci fix Atomy::PatternMismatch#message c82547f
Alex Suraci implement defaults in quasiquotation patterns 8403819
Alex Suraci remove stale TODO 23ff126
Alex Suraci remove another stale TODO 465a5a3
@vito vito merged commit 226d142 into master Jul 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment