Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Milhomme Allan
JavaMetaParser
Commits
0ebb3a53
Commit
0ebb3a53
authored
Oct 18, 2018
by
Custom2043
Browse files
Fix token build
parent
07b00196
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/parser/TokenBuilder.java
View file @
0ebb3a53
...
...
@@ -111,27 +111,26 @@ public class TokenBuilder extends Builder
for
(
Search
s
:
searchesWithIgnore
)
{
if
(
s
!=
this
.
ignore
.
getRealSearch
())
if
(
s
instanceof
ArraySearch
)
{
Result
[]
array
=
results
[
position
].
getArray
();
Search
[]
toSearchIn
;
List
<
Result
>
r
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
array
.
length
;
i
++)
if
(
s
!=
this
.
ignore
.
getRealSearch
())
if
(
s
instanceof
ArraySearch
)
{
toSearchIn
=
((
BracketSearch
)
array
[
i
].
getSearch
()).
getSearches
();
r
.
add
(
new
Result
(
new
BracketSearch
(
toSearchIn
),
this
.
getResultWithoutIgnores
(
array
[
i
].
getArray
(),
toSearchIn
)));
Result
[]
array
=
results
[
position
].
getArray
();
Search
[]
toSearchIn
;
List
<
Result
>
r
=
new
LinkedList
<>();
for
(
int
i
=
0
;
i
<
array
.
length
;
i
++)
{
toSearchIn
=
((
BracketSearch
)
array
[
i
].
getSearch
()).
getSearches
();
r
.
add
(
new
Result
(
new
BracketSearch
(
toSearchIn
),
this
.
getResultWithoutIgnores
(
array
[
i
].
getArray
(),
toSearchIn
)));
}
resultWithoutIgnore
.
add
(
new
Result
(
s
,
r
.
toArray
(
new
Result
[
r
.
size
()])));
}
resultWithoutIgnore
.
add
(
new
Result
(
s
,
r
.
toArray
(
new
Result
[
r
.
size
()])));
}
else
if
(
s
instanceof
OrSearch
)
resultWithoutIgnore
.
add
(
results
[
1
]);
else
if
(
s
instanceof
MultipleSearch
)
resultWithoutIgnore
.
add
(
new
Result
(
results
[
position
].
getSearch
(),
this
.
getResultWithoutIgnores
(
results
[
position
].
getArray
(),
((
MultipleSearch
)
s
).
getSearches
())));
else
resultWithoutIgnore
.
add
(
results
[
position
]);
else
if
(
s
instanceof
OrSearch
||
s
instanceof
TokenSearch
)
resultWithoutIgnore
.
add
(
results
[
position
]);
else
if
(
s
instanceof
MultipleSearch
)
resultWithoutIgnore
.
add
(
new
Result
(
results
[
position
].
getSearch
(),
this
.
getResultWithoutIgnores
(
results
[
position
].
getArray
(),
((
MultipleSearch
)
s
).
getSearches
())));
position
++;
}
...
...
Write
Preview
Supports
Markdown
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