mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 00:59:31 +00:00
Changed a few things
- Bumped to 0.15.0 - Add boot script - Change variable definition syntax, using a = to distinguish more cleary between identifier and value - Variables initial values are evaluated on first use instead of at parsing time - Error on variable redefinition. Means you should make sure to load saves after your scripts. - Improve string parsing, support for escape codes - Remove support for number literals with empty decimal part (42. for 42.0) as there's no distinction in Anselme and it conflicts with .function call suffix - Changed priority of : pair operator - Add type type, and type annotations to variables and function parameters - Change Lua function system to use regular Anselme functions - Defining a function from Lua is now way simpler and require providing a full Anselme function signature - Change Anselme function system - Dynamic dispatch, based on arity, type annotation and parameter names. Will select the most specific function at runtime. - Define way to overload most operators - Allow custom type to text formatters - Allow assignment to custom functions - Index operator ( renamed to () - Functions with parameters each have their own private namespace (scoping ersatz) - Internal: "custom"-mode operators now have their own expression AST type instead of cluttering the function system - Remove static type checker as it is barely useful with new function system. May or may not rewrite one in the future. - Improve error messages here and there - Internal: cleaning
This commit is contained in:
parent
4b139019c9
commit
64bc85741a
86 changed files with 2096 additions and 1012 deletions
|
|
@ -1,7 +1,4 @@
|
|||
local _={}
|
||||
_[121]={}
|
||||
_[120]={}
|
||||
_[119]={}
|
||||
_[118]={}
|
||||
_[117]={}
|
||||
_[116]={}
|
||||
|
|
@ -34,15 +31,15 @@ _[90]={}
|
|||
_[89]={}
|
||||
_[88]={}
|
||||
_[87]={}
|
||||
_[86]={data="c",tags=_[121]}
|
||||
_[85]={data="b",tags=_[120]}
|
||||
_[84]={data="a",tags=_[119]}
|
||||
_[83]={data="-> aa",tags=_[118]}
|
||||
_[82]={data="ab",tags=_[117]}
|
||||
_[81]={data="aa",tags=_[116]}
|
||||
_[80]={data="-> aa",tags=_[115]}
|
||||
_[79]={data="ab",tags=_[114]}
|
||||
_[78]={data="aa",tags=_[113]}
|
||||
_[86]={data="c",tags=_[118]}
|
||||
_[85]={data="b",tags=_[117]}
|
||||
_[84]={data="a",tags=_[116]}
|
||||
_[83]={data="-> aa",tags=_[115]}
|
||||
_[82]={data="ab",tags=_[114]}
|
||||
_[81]={data="aa",tags=_[113]}
|
||||
_[80]={data="-> aa",tags=_[112]}
|
||||
_[79]={data="ab",tags=_[112]}
|
||||
_[78]={data="aa",tags=_[112]}
|
||||
_[77]={data="-> a",tags=_[112]}
|
||||
_[76]={data="c",tags=_[111]}
|
||||
_[75]={data="b",tags=_[110]}
|
||||
|
|
@ -222,10 +219,10 @@ return {_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[1
|
|||
} } }
|
||||
{ "choice", { {
|
||||
data = "aa",
|
||||
tags = {}
|
||||
tags = <1>{}
|
||||
}, {
|
||||
data = "ab",
|
||||
tags = {}
|
||||
tags = <table 1>
|
||||
} } }
|
||||
{ "text", { {
|
||||
data = "-> aa",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue