Replace row/column based Location with byte-offsets.

This commit is contained in:
Micha Reiser 2023-05-06 15:54:14 +09:00 committed by Jeong YunWon
parent 7b8844bd3e
commit 58c35ab458
131 changed files with 12120 additions and 23198 deletions

View file

@ -4,6 +4,7 @@ use crate::{
ast,
lexer::{LexicalError, LexicalErrorType},
};
use ruff_text_size::TextSize;
use rustc_hash::FxHashSet;
pub(crate) struct ArgumentList {
@ -83,10 +84,7 @@ pub(crate) fn parse_params(
Ok((pos_only, names, defaults))
}
type FunctionArgument = (
Option<(ast::Location, ast::Location, Option<String>)>,
ast::Expr,
);
type FunctionArgument = (Option<(TextSize, TextSize, Option<String>)>, ast::Expr);
// Parse arguments as supplied during a function/lambda *call*.
pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentList, LexicalError> {