Everything should be primitive — no error handling, no validation, just enough to prove the pipe works.
- Create
include/script/lexer.h and src/script/lexer.cpp with tokenize_line() .
- Create
include/script/parser.h and src/script/parser.cpp with the Command struct and parse_line() .
include/script/interpreter.h + src/script/interpreter.cpp — load_script() + run_script() that handles exactly load and show, nothing else.
At the end we should have a example/test.em which contains the examples file for the interpreter they should look like this:
load img/pic.png show
How will run:
image-engine examples/test.em
The extension check fires, run_script is called, the script is parsed, the pic loads, the SFML window opens. The old CLI should still works exactly as before:
image-engine img/cat.png --gpu blur 50
Everything should be primitive — no error handling, no validation, just enough to prove the pipe works.
include/script/lexer.handsrc/script/lexer.cppwithtokenize_line().include/script/parser.handsrc/script/parser.cppwith theCommandstruct andparse_line().include/script/interpreter.h+src/script/interpreter.cpp—load_script()+run_script()that handles exactlyloadandshow, nothing else.At the end we should have a
example/test.emwhich contains the examples file for the interpreter they should look like this:load img/pic.png showHow will run:
image-engine examples/test.emThe extension check fires,
run_scriptis called, the script is parsed, the pic loads, the SFML window opens. The old CLI should still works exactly as before:image-engine img/cat.png --gpu blur 50