typst: highlight function name after #set / #show keywords
Build and Deploy Verso / deploy (push) Has been cancelled

KeywordExpr now optionally includes a CallExpr, so '#set text(size: 12pt)'
parses 'text' as a CallExpr/CodeIdent and gets the function-name highlight
colour.  The optional CallExpr only shifts when the lookahead is CodeIdent,
so there is no shift/reduce conflict with other items.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
claude
2026-06-08 08:40:28 +00:00
parent 07c72cf7e5
commit e9cc63a261
@@ -67,7 +67,10 @@ codeExprBody {
ContentBlock
}
KeywordExpr { CodeKeyword }
// CallExpr? covers '#set text(size: 12pt)', '#show heading: ...', etc.
// The optional CallExpr is only shifted when the next token is CodeIdent,
// so there is no shift/reduce conflict with other items that follow keywords.
KeywordExpr { CodeKeyword CallExpr? }
AtomExpr { CodeBool }
CallExpr { CodeIdent callSuffix* }