JSSpecCompiler: Ignore notes in algorithm steps

This commit is contained in:
Dan Klishch 2024-01-23 18:33:31 -05:00 committed by Andrew Kaster
parent ba61b61d67
commit f7c952f842
Notes: sideshowbarker 2024-07-16 19:57:55 +09:00
6 changed files with 30 additions and 8 deletions

View file

@ -598,10 +598,16 @@ TextParseErrorOr<Tree> TextParser::parse_else(Tree else_branch)
}
// <simple_step> | <inline_if>
TextParseErrorOr<Tree> TextParser::parse_step_without_substeps()
TextParseErrorOr<NullableTree> TextParser::parse_step_without_substeps()
{
auto rollback = rollback_point();
// NOTE: ...
if (auto result = consume_word("NOTE:"sv); !result.is_error()) {
rollback.disarm();
return nullptr;
}
// <simple_step>
if (auto result = parse_simple_step_or_inline_if_branch(); !result.is_error()) {
rollback.disarm();