Thank you for your answer. I'm not really interested in adding a new comments style, i only wanted to be sure about the intended rules for comments. Specifically I'm interested in your opinion on the formal correctness of indented comments like the second line hereInterkarma wrote: ↑Sat Aug 18, 2018 10:28 pmA comment line needs only start with a single "-" dash character and anything after it is ignored. It's not technically supported to place comments after the line, although a regex match will ignore everything after the match so it's possible.TheLacus wrote: ↑Sat Aug 18, 2018 12:23 pm I have a question for Interkarma: comments must start with the first char of the line, it is not correct to have something like " -- text" or "give pc _reward_ -- text", isn't it ? I think in some cases the trailing part of the line is ignored once the leading has been accepted and parsed, but i wanted to check with you if this is to be considered safe or i should mark it as an error.
Still, I'd prefer the syntax highlighting to only support intended comment usage and perhaps look at adding a different style of comment sequence for both single lines and trailing comments. Probably adding good old C // comment support would make the most sense. I mainly went with "-" as it was already being generated by TEMPLATE and was required for backward compatibility.
Code: Select all
-- Once the PC injures the _monster_, offer the PC a bribe of another
-- artifact to desist. In its haste to get away from the PC, _monster_
-- drops a scrap of paper that the PC may read.
I see three possiblities for the editor: 1) accept as correct, 2) accept but suggest to align to the left as refactoring, 3) report as error. Since it works in game, i would go with 1 or 2.
Thinking again, it would make sense to have an indentation in a task. I'm probably overthinking it but can you confirm this example is 100% correct?
Code: Select all
_S.00_ task:
clicked npc _priest_
-- now it prompts yes-no
prompt 1030 yes _S.03_ no _S.04_
-- now say message
say 1021