Skip to content

Releases: POLA-LCS/CPS-v2

2.1⭐

17 Oct 12:33

Choose a tag to compare

🖥️ 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 value where "value" can be a string or int (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 .
  • macro runs macro code 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

17 Oct 08:26

Choose a tag to compare

Pre-release

2.0.3

  • Added the json file macros.json that storage all the user macros
  • Handle file related errors such as JSONDecodeError or FileNotFound for 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 string inserts string into macro.code[integer] if it's posible
  • macro integer operator string:
    • = sets macro.code[integer] to string
    • + concatenates string to macro.code[integer]. eg: ('a' + 'b' = 'ab')
    • - pre-concatenates string to macro.code[integer]. eg: ('a' - 'b' = 'ba')

2.0.2

  • Fixed when input macro command does not work
  • Distinction between COMMAND and MODIFIER

2.0.1

  • New --version and -v commands

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: --info or -i
    • Help: --help or -h
    • Version: --version or -v

CPS 2.0: First state

15 Oct 06:25

Choose a tag to compare

CPS 2.0: First state Pre-release
Pre-release

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

  • Token class:
    • Has type and value
    • Rich comparisson, with Token, str and list[Token]
  • Tokenization with tokenize_argv:
    • lex_string
    • is_float
    • is_int
  • Extract the values of a list[Token] with extract_values
  • partial_match for lines starting with some Token pattern
  • partial_split to get matched