Skip to content

Commit

Permalink
Merge pull request #22 from madwareru/fixes/21_add-char-support
Browse files Browse the repository at this point in the history
Fixes/21 add char support
  • Loading branch information
madwareru authored Dec 10, 2021
2 parents 1c1c03e + 49efe2b commit c7b5006
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 171 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# RON Extended Support Changelog

## [Unreleased]
### Fixed
- Fixed char literal parsing. Now we support simple char literals.

## [0.2.6]
### Fixed
- Updated plugin to support new versions of IDE
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = com.github.madwareru.intellijronremix
pluginName = RON Extended Support
pluginVersion = 0.2.6
pluginVersion = 0.2.7

pluginSinceBuild = 203
pluginUntilBuild = 213.*
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RONSyntaxHighlighter : SyntaxHighlighterBase() {
RONTypes.BRACKETL, RONTypes.BRACKETR -> RONColor.BRACKETS
RONTypes.BRACEL, RONTypes.BRACER -> RONColor.BRACES
RONTypes.INTEGER, RONTypes.FLOAT -> RONColor.NUMBER
RONTypes.STRING, RONTypes.RAW_STRING -> RONColor.STRING
RONTypes.STRING, RONTypes.RAW_STRING, RONTypes.CHAR -> RONColor.STRING
RONTypes.SOME, RONTypes.NONE -> RONColor.OPTION
RONTypes.COMMENT, RONTypes.BLOCK_COMMENT -> RONColor.COMMENT
else -> null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
INTEGER = "regexp:[+-]?((0x[0-9A-Fa-f][0-9A-Fa-f_]*)|((0[bo]?)?[0-9][0-9_]*))"
FLOAT = "regexp:([+-]?[0-9]+\.[0-9]*([Ee][0-9]+)?)|(\.[0-9]+([Ee][0-9]+)?)"

CHAR = "regexp:'([ -&(-\[\]-~])|(\\')|(\\\\)'"
STRING = "regexp:\"([^\r\n\"]|(\\[\S]))*\""
CHAR = "CHAR"
STRING = "STRING"
RAW_STRING = "RAW STRING"

EXT_PREFIX = "#!["
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RONParserDefinition : ParserDefinition {

companion object {
val COMMENTS = TokenSet.create(RONTypes.COMMENT, RONTypes.BLOCK_COMMENT)
val STRING_LITERALS = TokenSet.create(RONTypes.STRING)
val STRING_LITERALS = TokenSet.create(RONTypes.STRING, RONTypes.RAW_STRING)
val FILE = IFileElementType(RONLanguage.INSTANCE)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ BOOLEAN=true|false
IDENT=[A-Za-z_][A-Za-z0-9_]*
INTEGER=[+-]?((0x[0-9A-Fa-f][0-9A-Fa-f_]*)|(0b[0-1][0-1_]*)|(0o[0-7][0-7_]*)|([0-9][0-9_]*))
FLOAT=([+-]?[0-9]+\.[0-9]*([Ee][0-9]+)?)|(\.[0-9]+([Ee][0-9]+)?)
CHAR='([ -&(-\[\]-~])|(\')|(\\\\)'
CHAR='([^\r\n\"] | (\\[\S]))'
STRING=\"([^\r\n\"]|(\\[\S]))*\"

%%
Expand Down

0 comments on commit c7b5006

Please sign in to comment.