diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-23 14:38:37 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-23 14:38:45 +0100 |
| commit | affb3534538385056cfb60328f6dba6bd852229a (patch) | |
| tree | a0a1b4844d459a66c3d32e0ad0dacf3f47c3966b /src/syntax | |
| parent | 090831c9cb08c9b3c14ee30b423bb61275d70eb4 (diff) | |
| parent | 457ce954366f3a81989fee788c85a5b20a96ce96 (diff) | |
Merge main back
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/ast.rs | 2 | ||||
| -rw-r--r-- | src/syntax/lexer.rs | 2 | ||||
| -rw-r--r-- | src/syntax/node.rs | 3 | ||||
| -rw-r--r-- | src/syntax/parser.rs | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index 97c8940d..75931a8c 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -5,13 +5,13 @@ use std::num::NonZeroUsize; use std::ops::Deref; +use ecow::EcoString; use unscanny::Scanner; use super::{ is_id_continue, is_id_start, is_newline, split_newlines, Span, SyntaxKind, SyntaxNode, }; use crate::geom::{AbsUnit, AngleUnit}; -use crate::util::EcoString; /// A typed AST node. pub trait AstNode: Sized { diff --git a/src/syntax/lexer.rs b/src/syntax/lexer.rs index b79b4c7f..bd168f0a 100644 --- a/src/syntax/lexer.rs +++ b/src/syntax/lexer.rs @@ -1,9 +1,9 @@ +use ecow::{format_eco, EcoString}; use unicode_segmentation::UnicodeSegmentation; use unicode_xid::UnicodeXID; use unscanny::Scanner; use super::{ErrorPos, SyntaxKind}; -use crate::util::{format_eco, EcoString}; /// Splits up a string of source code into tokens. #[derive(Clone)] diff --git a/src/syntax/node.rs b/src/syntax/node.rs index e216d3c9..392633f6 100644 --- a/src/syntax/node.rs +++ b/src/syntax/node.rs @@ -3,10 +3,11 @@ use std::ops::{Deref, Range}; use std::rc::Rc; use std::sync::Arc; +use ecow::EcoString; + use super::ast::AstNode; use super::{SourceId, Span, SyntaxKind}; use crate::diag::SourceError; -use crate::util::EcoString; /// A node in the untyped syntax tree. #[derive(Clone, Eq, PartialEq, Hash)] diff --git a/src/syntax/parser.rs b/src/syntax/parser.rs index 3b89e71c..483a076e 100644 --- a/src/syntax/parser.rs +++ b/src/syntax/parser.rs @@ -1,10 +1,10 @@ use std::collections::HashSet; use std::ops::Range; +use ecow::{format_eco, EcoString}; use unicode_math_class::MathClass; use super::{ast, is_newline, ErrorPos, LexMode, Lexer, SyntaxKind, SyntaxNode}; -use crate::util::{format_eco, EcoString}; /// Parse a source file. pub fn parse(text: &str) -> SyntaxNode { |
