make it clearer what is being returned
This commit is contained in:
parent
69ce8faad7
commit
f2108492b8
@ -56,10 +56,10 @@ int obelisk::Lexer::getToken()
|
|||||||
|
|
||||||
if (getIdentifier() == "extern")
|
if (getIdentifier() == "extern")
|
||||||
{
|
{
|
||||||
return kTokenExtern;
|
return Token::kTokenExtern;
|
||||||
}
|
}
|
||||||
|
|
||||||
return kTokenIdentifier;
|
return Token::kTokenIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isdigit(lastChar))
|
if (isdigit(lastChar))
|
||||||
|
16
src/lexer.h
16
src/lexer.h
@ -80,23 +80,27 @@ namespace obelisk
|
|||||||
* @brief A fact which is a relationship between 2 entities.
|
* @brief A fact which is a relationship between 2 entities.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenFact = -2,
|
kTokenFact = -2,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A rule which is a relationship between a new fact a
|
* @brief A rule which is a relationship between a new fact a
|
||||||
* existing fact.
|
* existing fact.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenRule = -3,
|
kTokenRule = -3,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief An action to take if a fact is true.
|
* @brief An action to take if a fact is true.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenAction = -4,
|
kTokenAction = -4,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A definition of a new function.
|
* @brief A definition of a new function.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenDef = -5,
|
kTokenDef = -5,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief An external function that will be linked to.
|
* @brief An external function that will be linked to.
|
||||||
*
|
*
|
||||||
@ -108,16 +112,18 @@ namespace obelisk
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenIdentifier = -7,
|
kTokenIdentifier = -7,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A double floating point value.
|
* @brief A double floating point value.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenNumber = -8,
|
kTokenNumber = -8,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A string.
|
* @brief A string.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
kTokenString = -9
|
kTokenString = -9
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user