[SOLVED] Teletype dev help - match_token.rl

I manually added my new OP VN to match_token.rl:

"VN"          => { MATCH_OP(E_OP_VN); };

But when I try to build, I get an error that E_OP_VN is undeclared. I see the declarations in match_token.c but that looks like a file I should manually adjust… What’s the right next step, here? I must’ve gotten it correct last week because I had none of these issues building the QT.SC OPs…

You need to add E_OP_VN to the tele_ops array in src/ops/ops.c and then run the utils/op_enums.py script to put the right enum declarations in the autogenerated src/ops/op_enum.h file. Using the script for this can be important because if the order doesn’t match between the enum and the tele_ops array, I believe you will get the wrong op being found / executed when you type its name in to the Teletype interpreter.

1 Like

Yep, I forgot to add it in op.c