String Instructions
Some checks failed
per-push tests / test-frontend (push) Blocked by required conditions
per-push tests / timed-decomposer-parse (push) Blocked by required conditions
per-push tests / test-utility (push) Blocked by required conditions
per-push tests / test-backend (push) Blocked by required conditions
per-push tests / build (push) Has been cancelled
Some checks failed
per-push tests / test-frontend (push) Blocked by required conditions
per-push tests / timed-decomposer-parse (push) Blocked by required conditions
per-push tests / test-utility (push) Blocked by required conditions
per-push tests / test-backend (push) Blocked by required conditions
per-push tests / build (push) Has been cancelled
The following instructions are modified to act on strings: - INDEX: Now pulls a char out at index - SUBSL: Now pulls a substring out of a source string - INSER: Now inserts a char into a string at index - LENGTH: Now returns length of a string In addition to the above instructions, additional instructions are now implemented to handle strings: - CONCAT: appends a string onto another string - S_APPEND: appends a char on to the end of a string Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
63554191f8
commit
0e21e4f822
3 changed files with 81 additions and 43 deletions
|
|
@ -312,3 +312,15 @@ name = "cdr"
|
|||
args = ["list"]
|
||||
output = "returns last element in cons cell"
|
||||
description = "takes an AST and returns last element in top level cons cell"
|
||||
|
||||
[[instructions]]
|
||||
name = "concat"
|
||||
args = ["string_l", "string_r"]
|
||||
output = "string_l+string_r"
|
||||
description = "concatenates string r to string l and returns a new string"
|
||||
|
||||
[[instructions]]
|
||||
name = "s_append"
|
||||
args = ["parent", "child"]
|
||||
output = ""
|
||||
description = "append in place child character into parent string"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue