Implement macro meta-variable expressions
This commit is contained in:
parent
10dccdc7fc
commit
8073a88f35
17 changed files with 900 additions and 44 deletions
|
@ -23,7 +23,7 @@ pub enum LitError {
|
|||
|
||||
impl LitKind {
|
||||
/// Converts literal token into a semantic literal.
|
||||
fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
|
||||
pub fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
|
||||
let token::Lit { kind, symbol, suffix } = lit;
|
||||
if suffix.is_some() && !kind.may_have_suffix() {
|
||||
return Err(LitError::InvalidSuffix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue