Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CodeMirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Moritz Aurel Pascal Schubotz
CodeMirror
Commits
9f834a94
Commit
9f834a94
authored
11 years ago
by
Ryan Prior
Committed by
Marijn Haverbeke
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[octave mode] added more builtins, fixed comments
(removed non-octave ... comments, added octave's # comments)
parent
11967c7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mode/octave/index.html
+4
-15
4 additions, 15 deletions
mode/octave/index.html
mode/octave/octave.js
+6
-4
6 additions, 4 deletions
mode/octave/octave.js
with
10 additions
and
19 deletions
mode/octave/index.html
+
4
−
15
View file @
9f834a94
...
...
@@ -27,25 +27,16 @@
<div><textarea
id=
"code"
name=
"code"
>
%numbers
1234
1234i
1234j
.234
.234j
2.23i
23e2
12E1j
123D-4
0x234
[1234 1234i 1234j]
[.234 .234j 2.23i]
[23e2 12E1j 123D-4 0x234]
%strings
'asda''a'
"asda""a"
%identifiers
a
as123
__asd__
a + as123 - __asd__
%operators
-
...
...
@@ -73,10 +64,8 @@ classdef properties events methods
global
persistent
%
one
line
comment
...
one
line
comment
%{
multi
line
commment
%}
1
</
textarea
></div>
<script>
...
...
This diff is collapsed.
Click to expand it.
mode/octave/octave.js
+
6
−
4
View file @
9f834a94
...
...
@@ -13,17 +13,19 @@ CodeMirror.defineMode("octave", function() {
var
builtins
=
wordRegexp
([
'
error
'
,
'
eval
'
,
'
function
'
,
'
abs
'
,
'
acos
'
,
'
atan
'
,
'
asin
'
,
'
cos
'
,
'
cosh
'
,
'
exp
'
,
'
log
'
,
'
prod
'
,
'
log10
'
,
'
max
'
,
'
min
'
,
'
sign
'
,
'
sin
'
,
'
sinh
'
,
'
cosh
'
,
'
exp
'
,
'
log
'
,
'
prod
'
,
'
sum
'
,
'
log10
'
,
'
max
'
,
'
min
'
,
'
sign
'
,
'
sin
'
,
'
sinh
'
,
'
sqrt
'
,
'
tan
'
,
'
reshape
'
,
'
break
'
,
'
zeros
'
,
'
default
'
,
'
margin
'
,
'
round
'
,
'
ones
'
,
'
rand
'
,
'
syn
'
,
'
ceil
'
,
'
floor
'
,
'
size
'
,
'
clear
'
,
'
zeros
'
,
'
eye
'
,
'
mean
'
,
'
std
'
,
'
cov
'
,
'
det
'
,
'
eig
'
,
'
inv
'
,
'
norm
'
,
'
rank
'
,
'
trace
'
,
'
expm
'
,
'
logm
'
,
'
sqrtm
'
,
'
linspace
'
,
'
plot
'
,
'
title
'
,
'
xlabel
'
,
'
ylabel
'
,
'
legend
'
,
'
text
'
,
'
meshgrid
'
,
'
mesh
'
,
'
num2str
'
'
title
'
,
'
xlabel
'
,
'
ylabel
'
,
'
legend
'
,
'
text
'
,
'
grid
'
,
'
meshgrid
'
,
'
mesh
'
,
'
num2str
'
,
'
fft
'
,
'
ifft
'
,
'
arrayfun
'
,
'
cellfun
'
,
'
input
'
,
'
fliplr
'
,
'
flipud
'
,
'
ismember
'
]);
var
keywords
=
wordRegexp
([
'
return
'
,
'
case
'
,
'
switch
'
,
'
else
'
,
'
elseif
'
,
'
end
'
,
'
endif
'
,
'
endfunction
'
,
'
if
'
,
'
otherwise
'
,
'
do
'
,
'
for
'
,
'
while
'
,
'
try
'
,
'
catch
'
,
'
classdef
'
,
'
properties
'
,
'
events
'
,
'
methods
'
,
'
global
'
,
'
persistent
'
,
'
endfor
'
,
'
endwhile
'
,
'
printf
'
,
'
disp
'
,
'
until
'
,
'
continue
'
'
methods
'
,
'
global
'
,
'
persistent
'
,
'
endfor
'
,
'
endwhile
'
,
'
printf
'
,
'
sprintf
'
,
'
disp
'
,
'
until
'
,
'
continue
'
,
'
pkg
'
]);
...
...
@@ -59,7 +61,7 @@ CodeMirror.defineMode("octave", function() {
return
'
comment
'
;
}
if
(
stream
.
match
(
/^
(
%
)
|
(\.\.\.)
/
)){
if
(
stream
.
match
(
/^
[
%#
]
/
)){
stream
.
skipToEnd
();
return
'
comment
'
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment