Mark tokens with the file position from where they're read. Restore this
position for tokens read from a token list. This means that line info does now show the actual point of definition. This is an improvement but needs to be refined. git-svn-id: svn://svn.cc65.org/cc65/trunk@4911 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -60,3 +60,18 @@ int TokHasIVal (token_t Tok)
|
||||
|
||||
|
||||
|
||||
void CopyToken (Token* Dst, const Token* Src)
|
||||
/* Copy a token from Src to Dst. The current value of Dst.SVal is free'd,
|
||||
* so Dst must be initialized.
|
||||
*/
|
||||
{
|
||||
/* Copy the fields */
|
||||
Dst->Tok = Src->Tok;
|
||||
Dst->WS = Src->WS;
|
||||
Dst->IVal = Src->IVal;
|
||||
SB_Copy (&Dst->SVal, &Src->SVal);
|
||||
Dst->Pos = Src->Pos;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user