Skip to content

Instantly share code, notes, and snippets.

@JettMonstersGoBoom
Created February 11, 2019 16:14
Show Gist options
  • Save JettMonstersGoBoom/f4b224103bfff6e4cb1f67a40d4e9e31 to your computer and use it in GitHub Desktop.
Save JettMonstersGoBoom/f4b224103bfff6e4cb1f67a40d4e9e31 to your computer and use it in GitHub Desktop.
regex for handling hex numbers
langDef.mTokenRegexStrings.push_back(std::make_pair<std::string, TextEditor::PaletteIndex>("[#][$][0-9a-fA-F]+[uU]?[lL]?[lL]?", TextEditor::PaletteIndex::Number));
langDef.mTokenRegexStrings.push_back(std::make_pair<std::string, TextEditor::PaletteIndex>("[$][0-9a-fA-F]+[uU]?[lL]?[lL]?", TextEditor::PaletteIndex::Number));
langDef.mTokenRegexStrings.push_back(std::make_pair<std::string, TextEditor::PaletteIndex>("0[xX][0-9a-fA-F]+[uU]?[lL]?[lL]?", TextEditor::PaletteIndex::Number));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment