cwLex.h/cpp: test() now returns an rc_t.
This commit is contained in:
parent
1c678700b7
commit
70ba7316bd
@ -853,7 +853,7 @@ namespace cw
|
|||||||
//)
|
//)
|
||||||
|
|
||||||
//(
|
//(
|
||||||
void test()
|
rc_t test()
|
||||||
{
|
{
|
||||||
rc_t rc = kOkRC;
|
rc_t rc = kOkRC;
|
||||||
unsigned tid = kInvalidId;
|
unsigned tid = kInvalidId;
|
||||||
@ -872,8 +872,8 @@ namespace cw
|
|||||||
// initialize a lexer with a buffer of text
|
// initialize a lexer with a buffer of text
|
||||||
if((rc = lex::create(h,buf,strlen(buf), kReturnSpaceLexFl | kReturnCommentsLexFl)) != kOkRC )
|
if((rc = lex::create(h,buf,strlen(buf), kReturnSpaceLexFl | kReturnCommentsLexFl)) != kOkRC )
|
||||||
{
|
{
|
||||||
cwLogError(rc,"Lexer initialization failed.");
|
rc = cwLogError(rc,"Lexer initialization failed.");
|
||||||
return;
|
goto errLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// register some additional recoginizers
|
// register some additional recoginizers
|
||||||
@ -913,9 +913,12 @@ namespace cw
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errLabel:
|
||||||
// finalize the lexer
|
// finalize the lexer
|
||||||
lex::destroy(h);
|
lex::destroy(h);
|
||||||
|
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user