mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-16 01:25:25 +00:00
clean up imports and useless allow attributes
This commit is contained in:
parent
a4f34f64e9
commit
bedb508667
3 changed files with 6 additions and 7 deletions
|
@ -88,7 +88,6 @@ struct CompileContext {
|
|||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
enum FunctionContext {
|
||||
NoFunction,
|
||||
Function,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use rustpython_ast::Location;
|
||||
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
use std::{error::Error, fmt};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CompileError {
|
||||
|
|
|
@ -7,11 +7,12 @@ load and store instructions for names.
|
|||
Inspirational file: https://github.com/python/cpython/blob/main/Python/symtable.c
|
||||
*/
|
||||
|
||||
use crate::error::{CompileError, CompileErrorType};
|
||||
use crate::IndexMap;
|
||||
use crate::{
|
||||
error::{CompileError, CompileErrorType},
|
||||
IndexMap,
|
||||
};
|
||||
use rustpython_ast::{self as ast, Location};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
use std::{borrow::Cow, fmt};
|
||||
|
||||
pub fn make_symbol_table(program: &[ast::Stmt]) -> SymbolTableResult<SymbolTable> {
|
||||
let mut builder = SymbolTableBuilder::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue