Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
7007d7b0
Commit
7007d7b0
authored
Mar 23, 2011
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syntax color 'derive', not 'default'
parent
819f37bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
25 deletions
+11
-25
Ed/EdTab.icl
Ed/EdTab.icl
+11
-25
No files found.
Ed/EdTab.icl
View file @
7007d7b0
...
...
@@ -11,8 +11,6 @@ import StdArray, StdBool, StdClass, StdEnum, StdList
import
StdIOCommon
,
StdPicture
,
StdPSt
import
EdMonad
,
syncol
//--
splitAtTabs
::
!
String
->
.[
String
]
splitAtTabs
string
=
splitAtTabs`
0
0
...
...
@@ -42,8 +40,6 @@ tabTake n [string:strings]
where
len
=
size
string
//--
alignAtTab`
x
tabSize
charWidth
|
tabSize
<=
0
=
x
+
charWidth
// sensible result for silly value
...
...
@@ -51,8 +47,6 @@ alignAtTab` x tabSize charWidth
where
tabWidth
=
tabSize
*
charWidth
//--
tabDrawString
::
!
Point2
!
String
!
FontInfo
!*
Picture
->
*
Picture
tabDrawString
point
string
{
thefont
,
showTabs
,
tabSize
,
charWidth
}
picture
#!
strings
=
splitAtTabs
string
...
...
@@ -132,8 +126,6 @@ where
#!
picture
=
setPenColour
textColour
picture
=
tabDrawString`
/*False*/
clevel
{
point
&
x
=
newX
}
strings
picture
drawC
::
/*!Bool*/
!
CommentLevel
!.
String
!*
Picture
->
(!
CommentLevel
,!*
Picture
)
drawC
/*ini*/
c
s
pic
=
drawC
c
pic
...
...
@@ -162,7 +154,7 @@ where
l
=
size
s
funnyChar
i
=
isStringMember
s
.[
i
]
(
dec
funnySize
)
funnyChars
//isStringMember:: a !.[a] -> .Bool | Eq a
isStringMember
::
!
Char
!
Int
!{#
Char
}
->
Bool
isStringMember
x
i
s
|
i
<
0
=
False
|
s
.[
i
]
==
x
=
True
...
...
@@ -319,18 +311,22 @@ where
T
l
->
l
<>
0
D
l
->
l
<>
0
_
->
False
dec_comment
cl
=
case
cl
of
N
l
->
N
(
dec
l
)
T
l
->
T
(
dec
l
)
D
l
->
D
(
dec
l
)
inc_comment
cl
=
case
cl
of
N
l
->
N
(
inc
l
)
T
l
->
T
(
inc
l
)
D
l
->
D
(
inc
l
)
non_comment_colour
cl
=
case
cl
of
N
_
->
textColour
T
_
->
typedefColour
D
_
->
typedeclColour
scankeyword
::
!.
String
!
Int
->
(!
Bool
,!
Int
)
scankeyword
s
i
#
c
=
s
.[
i
]
...
...
@@ -344,10 +340,10 @@ where
|
c
==
'g'
// generic
|
(
j
==
i
+7
)
&&
(
s
%(
i
,
i
+6
)==
"generic"
)
=
(
True
,
j
)
=
(
False
,
j
)
|
c
==
'd'
// definition
|
(
j
==
i
+10
)
&&
(
s
%(
i
,
i
+9
)==
"definition"
)
=
(
True
,
j
)
|
(
j
==
i
+7
)
&&
(
s
%(
i
,
i
+6
)==
"default"
)
=
(
True
,
j
)
// only in typedef!
|
(
j
==
i
+7
)
&&
(
s
%(
i
,
i
+6
)==
"dynamic"
)
=
(
True
,
j
)
|
c
==
'd'
// definition
, derive, dynamic
|
j
==
i
+10
=
(
s
%
(
i
,
i
+9
)==
"definition"
,
j
)
|
j
==
i
+6
=
(
s
%
(
i
,
i
+5
)==
"derive"
,
j
)
|
j
==
i
+7
=
(
s
%
(
i
,
i
+6
)==
"dynamic"
,
j
)
=
(
False
,
j
)
|
c
==
'i'
// implementation, import, if, in, infix, infixl, infixr, instance
|
(
j
==
i
+14
)
&&
(
s
%(
i
,
i
+13
)==
"implementation"
)
=
(
True
,
j
)
...
...
@@ -386,17 +382,6 @@ where
|
(
j
==
i
+4
)
&&
(
s
%(
i
,
i
+3
)==
"with"
)
=
(
True
,
j
)
|
(
j
==
i
+5
)
&&
(
s
%(
i
,
i
+4
)==
"where"
)
=
(
True
,
j
)
=
(
False
,
j
)
/* | c == 'B' // bool
| (j == i+4) && (s%(i,i+3)=="Bool") = (True,j)
= (False,j)
| c == 'C' // char
| (j == i+4) && (s%(i,i+3)=="Char") = (True,j)
= (False,j)
| c == 'I' // int
| (j == i+3) && (s%(i,i+2)=="Int") = (True,j)
= (False,j)
// True / False; numeric constants??
*/
=
(
False
,
j
)
scanalpha
i
|
i
>=
l
=
l
...
...
@@ -427,6 +412,7 @@ where
=
dS
(
inc
i
)
pic
#
pic
=
optDrawC
s
.[
i
]
pic
=
dS
(
inc
i
)
pic
dC
::
!
Int
!*
Picture
->
(!
CommentLevel
,!*
Picture
)
dC
i
pic
|
i
>=
l
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment