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