Preserve source locations, validate malformed JSON, and add opt-in resource limits. Include executable error-guide coverage, learner pilot materials, native Windows acceptance helpers, and updated CI/documentation.
57 lines
1.6 KiB
JSON
57 lines
1.6 KiB
JSON
[
|
|
{
|
|
"name": "quote",
|
|
"filename": "quote.claro",
|
|
"mode": "run",
|
|
"code": "SAY \"Start\"\nSAY \"unfinished\n",
|
|
"diagnostic": "quote.claro:2: Text is missing a closing quote. Add a double quote at the end.",
|
|
"repair": "SAY \"Start\"\nSAY \"finished\"\n",
|
|
"output": "Start\nfinished\n"
|
|
},
|
|
{
|
|
"name": "operand",
|
|
"filename": "operand.claro",
|
|
"mode": "run",
|
|
"code": "SET score 1\nSAY score +\n",
|
|
"diagnostic": "operand.claro:2: This expression needs a value after the operator.",
|
|
"repair": "SET score 1\nSAY score + 1\n",
|
|
"output": "2\n"
|
|
},
|
|
{
|
|
"name": "command",
|
|
"filename": "command.claro",
|
|
"mode": "check",
|
|
"code": "PRNT \"Hello\"\n",
|
|
"diagnostic": "command.claro:1: I do not know the command \"PRNT\". Did you mean \"SAY\"?",
|
|
"repair": "SAY \"Hello\"\n",
|
|
"output": "Hello\n"
|
|
},
|
|
{
|
|
"name": "assignment",
|
|
"filename": "assignment.claro",
|
|
"mode": "check",
|
|
"code": "SET name\n",
|
|
"diagnostic": "assignment.claro:1: SET needs a name and a value. Try: SET name \"Alex\"",
|
|
"repair": "SET name \"Alex\"\nSAY name\n",
|
|
"output": "Alex\n"
|
|
},
|
|
{
|
|
"name": "choice",
|
|
"filename": "choice.claro",
|
|
"mode": "check",
|
|
"code": "IF YES\n SAY \"Yes\"\n",
|
|
"diagnostic": "choice.claro:1: IF block opened here needs END",
|
|
"repair": "IF YES\n SAY \"Yes\"\nEND\n",
|
|
"output": "Yes\n"
|
|
},
|
|
{
|
|
"name": "variable",
|
|
"filename": "variable.claro",
|
|
"mode": "run",
|
|
"code": "SET score 10\nSAY socre\n",
|
|
"diagnostic": "variable.claro:2: I do not know the variable \"socre\" yet.",
|
|
"repair": "SET score 10\nSAY score\n",
|
|
"output": "10\n"
|
|
}
|
|
]
|