v0.3.0
BREAKING π
This release makes parcera
3 times faster π
Most of these changes related to the advices in Instaparse performance notes. Unfortunately this lead to some breaking changes to make it work π. Sorry for the inconvenience.
CHANGES
:simple-keyword
- before
[:simple-keyword "hello/world"]
- now
[:simple-keyword ":hello/world"]
. Note the:
at the beginning
- before
:macro-keyword
- before
[:macro-keyword "hello"]
- now
[:macro-keyword "::hello"]
. Note the::
at the beginning
- before
:string
- before
[:string "hello world"]
- now
[:string "\"hello world\""]
. Note that\"
is part of the content
- before
:regex
- before
[:regex "hello-world"]
- now
[:regex "#\"hello world\""]
. Note that#\"
is part of the content
- before
:whitespace
- before
[:whitespace ""]
- now
[:whitespace " \n"]
. Note that whitespace now cannot be empty
- before
:function
- before
[:function [:list ... ]]
- now
[:function ... ]
. Note that now the content of the function is directly associated with the function not with the enclosing list
- before
:tag
now only matches for literal and collections:conditional
and:conditional-splicing
- before
[:conditional [:list ... ]]
- now
[:conditional ... ]
. Note that now the content of the conditional is directly associated with the macro not with the enclosing list
- before
:character
- before
[:character "u1234"]
- now
[:character "\u1234"]
. Note that\
is part of the content
- before
REMOVED
-
character
,symbol
,simple-keyword
,macro-keyword
,number
,string
andregex
are now defined outside of the grammar string as regexes. This is to increase reusability of those regexes. -
map-namespace
no longer exists- before
[:map [:map-namespace [:simple-keyword "hello"]] [:map-content ....]]
- now
[:map ...]
. Note the that the namespace is no longer part ofmap
- before
-
comment
rule was removed and included inside:whitespace
.- before
[:comment "hello world"]
- now
[:whitespace " ;hello world"]
. Note the;
in the middle and the whitespace (if any)
- before
ADDED
:namespaced-map
grammar rule.- before
[:map [:map-namespace [:simple-keyword "hello"]] [:map-content ... ]]
- now
[:namespaced-map [:simple-keyword ":hello"] [:map ... ]]
. This way we re-use themap
rule definition and focus on the namespace as a distinctive characteristic instead of an optional "attribute" of a map.
- before