Releases: POLA-LCS/CPS-v2
Releases · POLA-LCS/CPS-v2
2.1⭐
🖥️ Home is where the heart is ❤️
Implemented all the CPS v1 features, making the json files semi-compatible (Only replace %% with !!)
⭐ I feel like I'm walking on sunshine
Macro parameters
- Create with
macro !! parameter valuewhere "value" can be astringorint(type checking coming soon). - Delete with
macro !! parameter . - Parameters inside macros code are represented with the
!!prefix.
How to call
- Default macro "
0" it's called when cps.py recieve no arguments . macrorunsmacrocode with the default arguments replaced.macro ! <args>runs the macro replacing the parameters positionally with the arguments.- Calling a macro with any NULL argument will replace it with the default parameter value.
CPS v2.0.3: Indexing and local save
2.0.3
- Added the json file
macros.jsonthat storage all the user macros - Handle file related errors such as
JSONDecodeErrororFileNotFoundfor reading and writing - Changed the macro representation from
dict[str, tuple[dict[str, str], list[str]]]to Macro class - Runtime macros now storage in a singleton called
MacroList
Syntax:
macro integer stringinsertsstringintomacro.code[integer]if it's posiblemacro integer operator string:-
=setsmacro.code[integer]tostring
-
+concatenatesstringtomacro.code[integer]. eg: ('a' + 'b' = 'ab')
-
-pre-concatenatesstringtomacro.code[integer]. eg: ('a' - 'b' = 'ba')
2.0.2
- Fixed when input
macro commanddoes not work - Distinction between COMMAND and MODIFIER
2.0.1
- New
--versionand-vcommands
Exit codes:
- 1: command line execution error
- 2: command line execution
BUGS:
- Exit code 0 is unreachable.
- Exit code 2 should be 0
Changed syntax detection
- New key command:
-
- Information:
--infoor-i
- Information:
-
- Help:
--helpor-h
- Help:
-
- Version:
--versionor-v
- Version:
CPS 2.0: First state
New interpreter!
Added a console interpreter (like python) to test the CPS instructions without modifying the future user configuration file.
You can exit from it typing exit.
It's a shame for your "exit" macro :(
Syntax for macros:
- Added create and delete in
- Added append and preppend
- Added extend and prextend
- Added swap
Easily scalable
Tokenclass:-
- Has
typeandvalue
- Has
-
- Rich comparisson, with
Token,strandlist[Token]
- Rich comparisson, with
- Tokenization with
tokenize_argv: -
lex_string
-
is_float
-
is_int
- Extract the values of a
list[Token]withextract_values partial_matchfor lines starting with someTokenpatternpartial_splitto get matched