Added string quote handler. Made strings abort on line break to improve performance.

This commit is contained in:
2021-07-16 17:03:35 +02:00
parent 9ebc93fd15
commit aad339c3f1
4 changed files with 46 additions and 32 deletions
@@ -0,0 +1,10 @@
package de.platon42.intellij.plugins.m68k;
import com.intellij.codeInsight.editorActions.SimpleTokenSetQuoteHandler;
import de.platon42.intellij.plugins.m68k.psi.M68kTypes;
public class M68kStringQuoteHandler extends SimpleTokenSetQuoteHandler {
public M68kStringQuoteHandler() {
super(M68kTypes.STRINGLIT);
}
}
@@ -45,8 +45,8 @@ BINARY=(%[01]+)
HEXADECIMAL=(\$[0-9a-f]+)
OCTAL=(@[0-7]+)
DECIMAL=([0-9]+)
STRINGLIT=(`([^`\\]|\\.)*`|'([^'\\]|\\.)*'|\"([^\"\\]|\\.)*\")
PLAINPARAM=(`([^`\\]|\\.)*`|'([^'\\]|\\.)*'|\"([^\"\\]|\\.)*\")|<([^>\\]|\\.)*>|([^,;\p{Blank}\r\n])+ // why does \R not work, I have no idea
STRINGLIT=(`([^`\\\r\n]|\\.)*`|'([^'\\\r\n]|\\.)*'|\"([^\"\\\r\n]|\\.)*\")
PLAINPARAM=(`([^`\\\r\n]|\\.)*`|'([^'\\\r\n]|\\.)*'|\"([^\"\\\r\n]|\\.)*\")|<([^>\\\r\n]|\\.)*>|([^,;\p{Blank}\r\n])+ // why does \R not work, I have no idea
COMMENT=([;].*+)
HASH_COMMENT=([#;*].*+)