use IndexMap over HashMap in prolog_parser
This commit is contained in:
@@ -8,6 +8,7 @@ description = " An operator precedence parser for the Rebis development version
|
|||||||
license = "BSD-3-Clause"
|
license = "BSD-3-Clause"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
indexmap = "1.0.2"
|
||||||
lexical = "2.1.0"
|
lexical = "2.1.0"
|
||||||
ordered-float = "0.5.0"
|
ordered-float = "0.5.0"
|
||||||
rug = { optional = true, version = "1.4.0" }
|
rug = { optional = true, version = "1.4.0" }
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ use crate::put_back_n::*;
|
|||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::io::{Bytes, Error as IOError, Read};
|
use std::io::{Bytes, Error as IOError, Read};
|
||||||
@@ -14,6 +13,7 @@ use std::ops::Deref;
|
|||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
|
|
||||||
|
use indexmap::IndexMap;
|
||||||
use unicode_reader::CodePoints;
|
use unicode_reader::CodePoints;
|
||||||
|
|
||||||
pub type Atom = String;
|
pub type Atom = String;
|
||||||
@@ -278,7 +278,7 @@ impl OpDirValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// name and fixity -> operator type and precedence.
|
// name and fixity -> operator type and precedence.
|
||||||
pub type OpDir = HashMap<OpDirKey, OpDirValue>;
|
pub type OpDir = IndexMap<OpDirKey, OpDirValue>;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct MachineFlags {
|
pub struct MachineFlags {
|
||||||
|
|||||||
Reference in New Issue
Block a user