Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Cloogle
Cloogle
Commits
a18ebf4d
Verified
Commit
a18ebf4d
authored
Jun 03, 2018
by
Camil Staps
🐟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate code
parent
c3c019b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
17 deletions
+1
-17
Cloogle/DB.icl
Cloogle/DB.icl
+1
-17
No files found.
Cloogle/DB.icl
View file @
a18ebf4d
...
...
@@ -136,6 +136,7 @@ patternMatches p s = m [c \\ c <-: p] [c \\ c <-: s]
where
// %: any character
// *: any number of characters (inefficient!)
// \*: the character '*'
// \w: a word character (a-zA-Z_`)
// \e: a word or digit character (a-zA-Z0-9_`)
// other characters are matched literally
...
...
@@ -422,23 +423,6 @@ where
abcSearch
(
ABCInstructionEntry
ie
)
=
(
ie
.
aie_instruction
==
s
,
[])
abcSearch
_
=
(
False
,
[])
patternMatches
::
SyntaxPattern
String
->
Bool
patternMatches
p
s
=
m
[
c
\\
c
<-:
p
]
[
c
\\
c
<-:
s
]
where
// %: any character
// *: any number of characters (inefficient!)
// \w: a word character (a-zA-Z_`)
// \e: a word or digit character (a-zA-Z0-9_`)
// other characters are matched literally
m
::
[
Char
]
[
Char
]
->
Bool
m
[]
[]
=
True
m
[
'%'
:
p
]
[_:
s
]
=
m
p
s
m
[
'*'
:
p
]
s
=
any
(
m
p
)
(
tails
s
)
m
[
'\\'
:
'w'
:
p
]
[
x
:
s
]
=
(
isAlpha
x
||
x
==
'_'
||
x
==
'`'
)
&&
m
p
s
m
[
'\\'
:
'e'
:
p
]
[
x
:
s
]
=
(
isAlpha
x
||
isDigit
x
||
x
==
'_'
||
x
==
'`'
)
&&
m
p
s
m
[
c
:
p
]
[
x
:
s
]
=
c
==
x
&&
m
p
s
m
_
_
=
False
filterExactName
::
!
String
!*
CloogleDB
->
*
CloogleDB
filterExactName
n
wrap
=:{
db
,
name_map
}
#
db
=
'
DB
'.
searchIndices
Intersect
[(
i
,[(
ExactResult
,
1
)])
\\
i
<-
idxs
]
db
...
...
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