-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into move-quadratic
- Loading branch information
Showing
19 changed files
with
233 additions
and
52 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Prism.languages.wolfram = { | ||
'comment': // Allow one level of nesting - note: regex taken from applescipt | ||
/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/, | ||
'string': { | ||
pattern: /"(?:\\.|[^"\\\r\n])*"/, | ||
greedy: true | ||
}, | ||
'keyword': /\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/, | ||
'context': { | ||
pattern: /\w+`+\w*/, | ||
alias: 'class-name' | ||
}, | ||
'blank': { | ||
pattern: /\b\w+_\b/, | ||
alias: 'regex' | ||
}, | ||
'global-variable': { | ||
pattern: /\$\w+/, | ||
alias: 'variable' | ||
}, | ||
'boolean': /\b(?:True|False)\b/, | ||
'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i, | ||
'operator': /\/\.|\;|\=\.|\^\=|\^\:\=|\:\=|\<\<|\>\>|\<\||\|\>|\:\>|\|\-\>|\-\>|\<\-|\@\@\@|\@\@|\@|\/\@|\=\!\=|\=\=\=|\=\=|\=|\+|\-|\^|\*|\[\/-+%=]=?|\!\=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, | ||
'punctuation': /[\|{}[\];(),.:]/ | ||
}; | ||
|
||
Prism.languages.mathematica = Prism.languages.wolfram; | ||
Prism.languages.wl = Prism.languages.wolfram; | ||
Prism.languages.nb = Prism.languages.wolfram; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<h2>Comments</h2> | ||
<pre><code> | ||
(* This is a comment *) | ||
</code></pre> | ||
|
||
<h2>Strings</h2> | ||
<pre><code> | ||
"foo bar baz" | ||
</code></pre> | ||
|
||
<h2>Numbers</h2> | ||
<pre><code> | ||
7 | ||
3.14 | ||
10. | ||
.001 | ||
1e100 | ||
3.14e-10 | ||
2147483647 | ||
</code></pre> | ||
|
||
<h2>Full example</h2> | ||
<pre><code> | ||
(* Most operators are supported *) | ||
f /@ {1, 2, 3}; | ||
f @@ Range[10]; | ||
f @@@ y; | ||
Module[{x=1}, | ||
Return @ $Failed | ||
] | ||
</code></pre> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.