Give identifier and int ast types

This commit is contained in:
Jeong YunWon 2023-05-10 19:17:11 +09:00
parent d495cd9129
commit 455bcc01a0
88 changed files with 3288 additions and 2300 deletions

View file

@ -84,7 +84,10 @@ pub(crate) fn parse_params(
Ok((pos_only, names, defaults))
}
type FunctionArgument = (Option<(TextSize, TextSize, Option<String>)>, ast::Expr);
type FunctionArgument = (
Option<(TextSize, TextSize, Option<ast::Identifier>)>,
ast::Expr,
);
// Parse arguments as supplied during a function/lambda *call*.
pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentList, LexicalError> {
@ -115,7 +118,10 @@ pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentLis
keywords.push(ast::Keyword::new(
start..end,
ast::KeywordData { arg: name, value },
ast::KeywordData {
arg: name.map(ast::Identifier::new),
value,
},
));
}
None => {