Commit d2de53ff authored by jayherron's avatar jayherron

Added multiline string support and incremented version

parent c37da4f8
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: TrioEditor
Bundle-SymbolicName: TrioEditor;singleton:=true
Bundle-Version: 1.0.2.qualifier
Bundle-Version: 1.0.3.qualifier
Bundle-Vendor: Jay Herron
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
......
......@@ -66,6 +66,11 @@ src:
// add the point
pt: diff(null, tags, {add}).commit
logInfo("addEnumPoints", "Adding " + pt.dis)
multilineStr: """
I have a lot to say
Many things
"""
// populate the point's history
fan: read(fan and cmd and equipRef==ahu->id)
......
......@@ -21,33 +21,35 @@ public class TrioScanner extends RuleBasedScanner {
IToken keyword = new Token(new TextAttribute(manager.getColor(ITrioColorConstants.KEYWORD)));
IToken bracket = new Token(new TextAttribute(manager.getColor(ITrioColorConstants.BRACKET)));
IRule[] rules = new IRule[16];
IRule[] rules = new IRule[17];
// Multi-line rules
// Comment
rules[0] = new MultiLineRule("/*", "*/", comment);
// Multi-line string
rules[1] = new MultiLineRule("\"\"\"", "\"\"\"", string);
// End-of-line rules
// Comment
rules[1] = new EndOfLineRule("//", comment);
rules[2] = new EndOfLineRule("//", comment);
// Single-line rules
// Rec split
rules[2] = new SingleLineRule("---", "", split);
rules[3] = new SingleLineRule("---", "", split);
// String
rules[3] = new SingleLineRule("\"", "\"", string, '\\');
rules[4] = new SingleLineRule("\"", "\"", string, '\\');
// Uri
rules[4] = new SingleLineRule("`", "`", uri, '\\');
rules[5] = new SingleLineRule("`", "`", uri, '\\');
// Coordinates
rules[5] = new SingleLineRule("C(", ")", coordinate);
rules[6] = new SingleLineRule("C(", ")", coordinate);
// Numbers
rules[6] = new HaystackNumberRule(number);
rules[7] = new HaystackNumberRule(number);
// Refs
rules[7] = new RefRule(ref);
rules[8] = new RefRule(ref);
// Add generic whitespace rule.
rules[8] = new WhitespaceRule(new TrioWhitespaceDetector());
rules[9] = new WhitespaceRule(new TrioWhitespaceDetector());
// Keywords
KeywordRule keywords = new KeywordRule();
......@@ -65,15 +67,15 @@ public class TrioScanner extends RuleBasedScanner {
keywords.addWord("null", keyword);
keywords.addWord("true", keyword);
keywords.addWord("false", keyword);
rules[9] = keywords;
rules[10] = keywords;
// Character rules
rules[10] = new CharRule('(', bracket);
rules[11] = new CharRule(')', bracket);
rules[12] = new CharRule('{', bracket);
rules[13] = new CharRule('}', bracket);
rules[14] = new CharRule('[', bracket);
rules[15] = new CharRule(']', bracket);
rules[11] = new CharRule('(', bracket);
rules[12] = new CharRule(')', bracket);
rules[13] = new CharRule('{', bracket);
rules[14] = new CharRule('}', bracket);
rules[15] = new CharRule('[', bracket);
rules[16] = new CharRule(']', bracket);
setRules(rules);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment