forked from xxq250/Nasal-Interpreter
🚀 add [[noreturn]]
This commit is contained in:
+4
-1
@@ -39,7 +39,10 @@
|
|||||||
.vs
|
.vs
|
||||||
x64
|
x64
|
||||||
|
|
||||||
# misc
|
# nasal executable
|
||||||
nasal
|
nasal
|
||||||
|
nasal.exe
|
||||||
|
|
||||||
|
# misc
|
||||||
.vscode
|
.vscode
|
||||||
dump
|
dump
|
||||||
@@ -62,6 +62,7 @@ void logo()
|
|||||||
<<"input <nasal -h> to get help .\n";
|
<<"input <nasal -h> to get help .\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[noreturn]]
|
||||||
void err()
|
void err()
|
||||||
{
|
{
|
||||||
std::cerr
|
std::cerr
|
||||||
|
|||||||
+3
-1
@@ -42,7 +42,7 @@ protected:
|
|||||||
void lstate();
|
void lstate();
|
||||||
void ustate();
|
void ustate();
|
||||||
void detail();
|
void detail();
|
||||||
void die(const string&);
|
[[noreturn]] void die(const string&);
|
||||||
/* vm calculation functions*/
|
/* vm calculation functions*/
|
||||||
bool condition(nas_ref);
|
bool condition(nas_ref);
|
||||||
/* vm operands */
|
/* vm operands */
|
||||||
@@ -307,6 +307,8 @@ void nasal_vm::detail()
|
|||||||
lstate();
|
lstate();
|
||||||
ustate();
|
ustate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[noreturn]]
|
||||||
void nasal_vm::die(const string& str)
|
void nasal_vm::die(const string& str)
|
||||||
{
|
{
|
||||||
std::cout<<"[vm] "<<str<<"\n";
|
std::cout<<"[vm] "<<str<<"\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user