Skip to content

Commit ebae8fd

Browse files
authored
Merge pull request #8 from JohanWiltink/patch-1
Allow negative number literals in source code
2 parents 4ae33e2 + e264c04 commit ebae8fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lambdacalc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CodeMirror.defineMode("lambdacalc", function(_config, modeConfig) {
2121
const assign = /=/
2222
const brack = /\(|\)/
2323
const lamArg = /[a-zA-Z_][a-zA-Z0-9_\-']*|\./
24-
const numconst = /\d+/
24+
const numconst = /-?\d+/
2525

2626
function expectDefOrTerm(stream, state) {
2727
if (stream.match(/.*=/, false)) return expectDef(stream, state);

0 commit comments

Comments
 (0)