You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Calls to user-defined and imported functions aren't highlighted #22
Calls to functions that are declared in the contract or imported, like requireVaultUnchanged(vaultIndex), show in the default text colour. The declaration function requireVaultUnchanged(...) gets a function colour, and so do built-ins like sha256(...) and checkSig(...).
Cause
syntaxes/cashscript.tmLanguage.json only scopes function names it knows in advance:
declaration-function matches the name after the function keyword.
global-functions lists the built-ins: abs, min, max, within, the hashing and signature-checking functions, date, toPaddedBytes and the LockingBytecode* constructors.
members covers split, reverse, slice and log.
No rule matches a general name( call, and the extension provides no semantic tokens that would fill the gap. Before 0.14, user code couldn't call functions, so the grammar never needed one. Now that contracts call their own and imported functions, those calls don't stand out.
Possible fix
Add a generic call pattern after the existing ones, so keywords (if, while, require), type casts (bytes6(...)) and the built-ins keep their current scopes:
Activity