mirror of
https://github.com/heyman/heynote.git
synced 2024-11-21 23:43:22 +01:00
Support Dart Syntax
This commit is contained in:
parent
78e2bb2ec3
commit
d943fc8015
@ -19,7 +19,7 @@ Available for Mac, Windows, and Linux.
|
|||||||
- Block-based
|
- Block-based
|
||||||
- Syntax highlighting:
|
- Syntax highlighting:
|
||||||
|
|
||||||
C++, C#, Clojure, CSS, Erlang, Go, Groovy, HTML, Java, JavaScript, JSX, Kotlin, TypeScript, TOML, TSX, JSON, Lezer, Markdown, PHP, Python, Ruby, Rust, Shell, SQL, Swift, XML, YAML
|
C++, C#, Clojure, CSS, Erlang, Dart, Go, Groovy, HTML, Java, JavaScript, JSX, Kotlin, TypeScript, TOML, TSX, JSON, Lezer, Markdown, PHP, Python, Ruby, Rust, Shell, SQL, Swift, XML, YAML
|
||||||
|
|
||||||
- Language auto-detection
|
- Language auto-detection
|
||||||
- Auto-formatting
|
- Auto-formatting
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
importScripts("guesslang.min.js")
|
importScripts("guesslang.min.js")
|
||||||
|
|
||||||
GUESSLANG_LANGUAGES = ["json","py","html","sql","md","java","php","css","xml","cpp","rs","cs","rb","sh","yaml","toml","go","clj","erl","js","ts","swift","kt","groovy","ps1"]
|
GUESSLANG_LANGUAGES = ["json","py","html","sql","md","java","php","css","xml","cpp","rs","cs","rb","sh","yaml","toml","go","clj","erl","js","ts","swift","kt","groovy","ps1","dart"]
|
||||||
|
|
||||||
const guessLang = new self.GuessLang()
|
const guessLang = new self.GuessLang()
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ NoteDelimiter {
|
|||||||
|
|
||||||
@tokens {
|
@tokens {
|
||||||
noteDelimiterMark { "∞∞∞" }
|
noteDelimiterMark { "∞∞∞" }
|
||||||
NoteLanguage { "text" | "math" | "javascript" | "typescript" | "jsx" | "tsx" | "json" | "python" | "html" | "sql" | "markdown" | "java" | "php" | "css" | "xml" | "cpp" | "rust" | "csharp" | "ruby" | "shell" | "yaml" | "golang" | "clojure" | "erlang" | "lezer" | "toml" | "swift" | "kotlin" | "groovy" | "diff" | "powershell" }
|
NoteLanguage { "text" | "math" | "javascript" | "typescript" | "jsx" | "tsx" | "json" | "python" | "html" | "sql" | "markdown" | "java" | "php" | "css" | "xml" | "cpp" | "rust" | "csharp" | "ruby" | "shell" | "yaml" | "golang" | "clojure" | "erlang" | "lezer" | "toml" | "swift" | "kotlin" | "groovy" | "diff" | "powershell" | "dart" }
|
||||||
Auto { "-a" }
|
Auto { "-a" }
|
||||||
noteDelimiterEnter { "\n" }
|
noteDelimiterEnter { "\n" }
|
||||||
//NoteContent { String }
|
//NoteContent { String }
|
||||||
|
@ -10,7 +10,7 @@ export const parser = LRParser.deserialize({
|
|||||||
maxTerm: 10,
|
maxTerm: 10,
|
||||||
skippedNodes: [0],
|
skippedNodes: [0],
|
||||||
repeatNodeCount: 1,
|
repeatNodeCount: 1,
|
||||||
tokenData: "-x~RbYZ!Z}!O!`#V#W!k#W#X$X#X#Y$k#Z#[%Z#[#]%|#^#_&`#_#`'|#`#a(f#a#b)O#d#e)}#f#g+i#g#h+x#h#i,b#l#m&S#m#n-a%&x%&y-g~!`OX~~!cP#T#U!f~!kOU~~!nR#`#a!w#d#e#l#g#h#r~!zP#c#d!}~#QP#^#_#T~#WP#i#j#Z~#^P#f#g#a~#dP#X#Y#g~#lOT~~#oP#d#e#g~#uQ#[#]#{#g#h#g~$OP#T#U$R~$UP#f#g#l~$[P#]#^$_~$bP#Y#Z$e~$hP#Y#Z#g~$nP#f#g$q~$tP#`#a$w~$zP#T#U$}~%QP#b#c%T~%WP#Z#[#g~%^Q#c#d$q#f#g%d~%gP#c#d%j~%mP#c#d%p~%sP#j#k%v~%yP#m#n#g~&PP#h#i&S~&VP#a#b&Y~&]P#`#a#g~&cQ#T#U&i#g#h'm~&lP#j#k&o~&rP#T#U&u~&zPT~#g#h&}~'QP#V#W'T~'WP#f#g'Z~'^P#]#^'a~'dP#d#e'g~'jP#h#i#g~'pQ#c#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~'aP#V#W'd~'gP#f#g'j~'mP#]#^'p~'sP#d#e$h~'yQ#c#d(P#l#m#g~(SP#b#c#g~(YP#c#d(]~(`P#h#i(c~(fP#`#a(i~(lP#]#^(P~(rP#X#Y(u~(xP#n#o({~)OP#X#Y)R~)UP#f#g#g~)[P#T#U)_~)bQ#f#g)h#h#i*Q~)kP#_#`)n~)qP#W#X)t~)wP#c#d)z~)}P#k#l(P~*TP#[#]#g~*ZR#[#]#l#c#d*d#m#n+`~*gP#k#l*j~*mP#X#Y*p~*sP#f#g*v~*yP#g#h*|~+PP#[#]+S~+VP#X#Y+Y~+]P#`#a&i~+cP#h#i+f~+iP#[#]+l~+oP#c#d(P~+uP#i#j+x~+{Q#U#V&V#g#h$h~,UR#[#]+S#e#f&i#k#l,_~,bP#]#^,e~,hP#Y#Z$h~,nS#X#Y,z#c#d&c#g#h-Q#m#n-W~,}P#l#m$h~-TP#l#m#g~-ZP#d#e-^~-aP#X#Y-d~-gP#g#h'^~-mP#T#U&c~-sP%&x%&y-v~-yP%&x%&y-|~.ROY~",
|
||||||
tokenizers: [0, noteContent],
|
tokenizers: [0, noteContent],
|
||||||
topRules: {"Document":[0,2]},
|
topRules: {"Document":[0,2]},
|
||||||
tokenPrec: 0
|
tokenPrec: 0
|
||||||
|
@ -22,7 +22,7 @@ import { clojure } from "@codemirror/legacy-modes/mode/clojure"
|
|||||||
import { erlang } from "@codemirror/legacy-modes/mode/erlang"
|
import { erlang } from "@codemirror/legacy-modes/mode/erlang"
|
||||||
import { toml } from "@codemirror/legacy-modes/mode/toml"
|
import { toml } from "@codemirror/legacy-modes/mode/toml"
|
||||||
import { swift } from "@codemirror/legacy-modes/mode/swift"
|
import { swift } from "@codemirror/legacy-modes/mode/swift"
|
||||||
import { kotlin } from "@codemirror/legacy-modes/mode/clike"
|
import { kotlin, dart } from "@codemirror/legacy-modes/mode/clike"
|
||||||
import { groovy } from "@codemirror/legacy-modes/mode/groovy"
|
import { groovy } from "@codemirror/legacy-modes/mode/groovy"
|
||||||
import { diff } from "@codemirror/legacy-modes/mode/diff";
|
import { diff } from "@codemirror/legacy-modes/mode/diff";
|
||||||
import { powerShell } from "@codemirror/legacy-modes/mode/powershell";
|
import { powerShell } from "@codemirror/legacy-modes/mode/powershell";
|
||||||
@ -253,6 +253,12 @@ export const LANGUAGES = [
|
|||||||
parser: StreamLanguage.define(powerShell).parser,
|
parser: StreamLanguage.define(powerShell).parser,
|
||||||
guesslang: "ps1",
|
guesslang: "ps1",
|
||||||
}),
|
}),
|
||||||
|
new Language({
|
||||||
|
token: "dart",
|
||||||
|
name: "Dart",
|
||||||
|
parser: StreamLanguage.define(dart).parser,
|
||||||
|
guesslang: "dart",
|
||||||
|
}),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user