mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Remove unnecessary params
This commit is contained in:
parent
8efba903c3
commit
0a18f0a809
@ -781,12 +781,9 @@ namespace chaiscript
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Reads a number from the input, detecting if it's an integer or floating point
|
/// Reads a number from the input, detecting if it's an integer or floating point
|
||||||
bool Num(const bool t_capture = false) {
|
bool Num() {
|
||||||
SkipWS();
|
SkipWS();
|
||||||
|
|
||||||
if (!t_capture) {
|
|
||||||
return Hex_() || Float_();
|
|
||||||
} else {
|
|
||||||
const auto start = m_position;
|
const auto start = m_position;
|
||||||
if (m_position.has_more() && char_in_alphabet(*m_position, detail::float_alphabet) ) {
|
if (m_position.has_more() && char_in_alphabet(*m_position, detail::float_alphabet) ) {
|
||||||
try {
|
try {
|
||||||
@ -833,7 +830,6 @@ namespace chaiscript
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Reads an identifier from input which conforms to C's identifier naming conventions, without skipping initial whitespace
|
/// Reads an identifier from input which conforms to C's identifier naming conventions, without skipping initial whitespace
|
||||||
bool Id_() {
|
bool Id_() {
|
||||||
@ -1188,12 +1184,9 @@ namespace chaiscript
|
|||||||
|
|
||||||
|
|
||||||
/// Reads (and potentially captures) a quoted string from input. Translates escaped sequences.
|
/// Reads (and potentially captures) a quoted string from input. Translates escaped sequences.
|
||||||
bool Quoted_String(const bool t_capture = false) {
|
bool Quoted_String() {
|
||||||
SkipWS();
|
SkipWS();
|
||||||
|
|
||||||
if (!t_capture) {
|
|
||||||
return Quoted_String_();
|
|
||||||
} else {
|
|
||||||
const auto start = m_position;
|
const auto start = m_position;
|
||||||
|
|
||||||
if (Quoted_String_()) {
|
if (Quoted_String_()) {
|
||||||
@ -1275,7 +1268,6 @@ namespace chaiscript
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Reads a character group from input, without skipping initial whitespace
|
/// Reads a character group from input, without skipping initial whitespace
|
||||||
bool Single_Quoted_String_() {
|
bool Single_Quoted_String_() {
|
||||||
@ -1306,12 +1298,9 @@ namespace chaiscript
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Reads (and potentially captures) a char group from input. Translates escaped sequences.
|
/// Reads (and potentially captures) a char group from input. Translates escaped sequences.
|
||||||
bool Single_Quoted_String(const bool t_capture = false) {
|
bool Single_Quoted_String() {
|
||||||
SkipWS();
|
SkipWS();
|
||||||
|
|
||||||
if (!t_capture) {
|
|
||||||
return Single_Quoted_String_();
|
|
||||||
} else {
|
|
||||||
const auto start = m_position;
|
const auto start = m_position;
|
||||||
if (Single_Quoted_String_()) {
|
if (Single_Quoted_String_()) {
|
||||||
std::string match;
|
std::string match;
|
||||||
@ -1336,7 +1325,6 @@ namespace chaiscript
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// Reads a char from input if it matches the parameter, without skipping initial whitespace
|
/// Reads a char from input if it matches the parameter, without skipping initial whitespace
|
||||||
bool Char_(const char c) {
|
bool Char_(const char c) {
|
||||||
@ -2088,7 +2076,7 @@ namespace chaiscript
|
|||||||
bool retval = false;
|
bool retval = false;
|
||||||
|
|
||||||
const auto prev_stack_top = m_match_stack.size();
|
const auto prev_stack_top = m_match_stack.size();
|
||||||
if (Lambda() || Num(true) || Quoted_String(true) || Single_Quoted_String(true) ||
|
if (Lambda() || Num() || Quoted_String() || Single_Quoted_String() ||
|
||||||
Paren_Expression() || Inline_Container() || Id(false))
|
Paren_Expression() || Inline_Container() || Id(false))
|
||||||
{
|
{
|
||||||
retval = true;
|
retval = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user