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