add nom_locate

main
notafile 2022-01-04 17:24:49 +01:00
parent 76d24042ce
commit 465c63706b
3 changed files with 22 additions and 0 deletions

18
Cargo.lock generated
View File

@ -28,6 +28,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bytecount"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e"
[[package]]
name = "clap"
version = "2.34.0"
@ -48,6 +54,7 @@ name = "futilehdl"
version = "0.1.0"
dependencies = [
"nom",
"nom_locate",
"structopt",
]
@ -104,6 +111,17 @@ dependencies = [
"version_check",
]
[[package]]
name = "nom_locate"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37794436ca3029a3089e0b95d42da1f0b565ad271e4d3bb4bad0c7bb70b10605"
dependencies = [
"bytecount",
"memchr",
"nom",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"

View File

@ -7,4 +7,5 @@ edition = "2021"
[dependencies]
nom = "7.1.0"
nom_locate = "4.0.0"
structopt = "0.3.25"

View File

@ -8,6 +8,9 @@ use nom::{
sequence::{delimited, pair, preceded, separated_pair, terminated, tuple},
};
use nom_locate::{position, LocatedSpan};
type Span<'a> = LocatedSpan<&'a str>;
use crate::literals::{decimal, hexadecimal};
use crate::IResult;