Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
72fd03a6
Unverified
Commit
72fd03a6
authored
Dec 13, 2022
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting, fix in is_unquoted test
parent
61f464ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
include/cif++/condition.hpp
+7
-10
include/cif++/parser.hpp
+10
-6
No files found.
include/cif++/condition.hpp
View file @
72fd03a6
...
...
@@ -147,7 +147,6 @@ class condition
}
private
:
void
optimise
(
condition_impl
*&
impl
);
condition_impl
*
m_impl
;
...
...
@@ -195,9 +194,7 @@ namespace detail
bool
test
(
row_handle
r
)
const
override
{
return
m_single_hit
.
has_value
()
?
*
m_single_hit
==
r
:
r
[
m_item_ix
].
compare
(
m_value
,
m_icase
)
==
0
;
return
m_single_hit
.
has_value
()
?
*
m_single_hit
==
r
:
r
[
m_item_ix
].
compare
(
m_value
,
m_icase
)
==
0
;
}
void
str
(
std
::
ostream
&
os
)
const
override
...
...
@@ -285,7 +282,7 @@ namespace detail
std
::
string
m_value
;
bool
m_icase
=
false
;
std
::
optional
<
row_handle
>
m_single_hit
;
};
};
struct
key_compare_condition_impl
:
public
condition_impl
{
...
...
@@ -483,7 +480,7 @@ namespace detail
{
if
(
sub
->
test
(
r
))
continue
;
result
=
false
;
break
;
}
...
...
@@ -522,7 +519,7 @@ namespace detail
result
=
s
;
continue
;
}
if
(
s
==
result
)
continue
;
...
...
@@ -582,7 +579,7 @@ namespace detail
result
=
true
;
break
;
}
return
result
;
}
...
...
@@ -615,7 +612,7 @@ namespace detail
result
=
s
;
continue
;
}
if
(
s
==
result
)
continue
;
...
...
@@ -688,7 +685,7 @@ inline condition operator or(condition &&a, condition &&b)
return
condition
(
new
detail
::
key_equals_or_empty_condition_impl
(
ci
));
}
else
if
(
typeid
(
*
b
.
m_impl
)
==
typeid
(
detail
::
key_equals_condition_impl
)
and
typeid
(
*
a
.
m_impl
)
==
typeid
(
detail
::
key_is_empty_condition_impl
))
typeid
(
*
a
.
m_impl
)
==
typeid
(
detail
::
key_is_empty_condition_impl
))
{
auto
ci
=
static_cast
<
detail
::
key_equals_condition_impl
*>
(
b
.
m_impl
);
auto
ce
=
static_cast
<
detail
::
key_is_empty_condition_impl
*>
(
a
.
m_impl
);
...
...
include/cif++/parser.hpp
View file @
72fd03a6
...
...
@@ -94,13 +94,17 @@ class sac_parser
static
bool
is_unquoted_string
(
std
::
string_view
text
)
{
bool
result
=
true
;
for
(
auto
ch
:
text
)
bool
result
=
is_ordinary
(
text
.
front
());
if
(
result
)
{
if
(
is_non_blank
(
ch
))
continue
;
result
=
false
;
break
;
for
(
auto
ch
:
text
)
{
if
(
is_non_blank
(
ch
))
continue
;
result
=
false
;
break
;
}
}
static
const
std
::
regex
kReservedRx
(
R"(loop_|stop_|global_|data_\S+|save_\S+)"
,
std
::
regex_constants
::
icase
);
...
...
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