No syntax highlighting for strings on base constructor parameter list


Such a dumb question but i’ve been struggling with it for some time now, any ideas on why my syntax “Fixed” and “FIX” in my constructor arent highlighting?

Looks like a bug in the editor you’re using. Please report it in the editor’s bug tracker.

Thanks, when creating the token contract tthe FIX is supposed to be the token symbol after pasting the contract hash into metamask’s custom token, it doesnt seem the editor is registering it as a symbol because it’s not highlighting it? do you know if this is a known problem?

There’s no special syntax for token symbols Solidity. To the compiler/editor they’re just strings and should be highlighted as such. So "FIX" should look exactly the same as in e.g. string memory symbol = "FIX";. If it doesn’t, then it’s a bug in the highlighter.

If the editor you’re using is using the compiler to parse the code and highlights based on the AST then it might be affected by a compiler bug, but I am not aware of any such bugs currently in the compiler. I can’t rule that out completely - if you can reproduce it in more than one editor then it might be a compiler bug - but most editors probably do not depend on the compiler for highlighting so I think this is unlikely.

I don’t know what editor you are using so I can’t say anything concrete about it. If you report it there, you’ll probably get a more concrete response than on a language design forum :slight_smile:

1 Like

Thank you sir, VS Code

Please report it in

EDIT: I mean, if you are using this specific extension. But I suppose this is the most popular one for VS Code so you probably are :slight_smile:

1 Like

Done, appreciate you!