git.delta.rocks / jrsonnet / refs/commits / 4cba987da17b

difftreelog

fix parser imports after renaming

Лач2020-06-27parent: #b9714ab.patch.diff
in: master

1 file changed

modifiedcmds/jrsonnet/src/main.rsdiffbeforeafterboth
22
3use clap::Clap;3use clap::Clap;
4use jrsonnet_evaluator::{EvaluationSettings, EvaluationState, LocError, StackTrace, Val};4use jrsonnet_evaluator::{EvaluationSettings, EvaluationState, LocError, StackTrace, Val};
5use jsonnet_parser::{el, Arg, ArgsDesc, Expr, LocExpr, ParserSettings};5use jrsonnet_parser::{el, Arg, ArgsDesc, Expr, LocExpr, ParserSettings};
6use location::{offset_to_location, CodeLocation};6use location::{offset_to_location, CodeLocation};
7use std::env::current_dir;7use std::env::current_dir;
8use std::{collections::HashMap, path::PathBuf, rc::Rc, str::FromStr};8use std::{collections::HashMap, path::PathBuf, rc::Rc, str::FromStr};
155 for ExtStr { name, value } in opts.tla_code.iter().cloned() {155 for ExtStr { name, value } in opts.tla_code.iter().cloned() {
156 desc_map.insert(156 desc_map.insert(
157 name,157 name,
158 jsonnet_parser::parse(158 jrsonnet_parser::parse(
159 &value,159 &value,
160 &ParserSettings {160 &ParserSettings {
161 file_name: Rc::new(PathBuf::new()),161 file_name: Rc::new(PathBuf::new()),
211 print_trace(&(err.1), evaluator, &opts);211 print_trace(&(err.1), evaluator, &opts);
212}212}
213213
214fn print_syntax_error(error: jsonnet_parser::ParseError, file: &PathBuf, code: &str) {214fn print_syntax_error(error: jrsonnet_parser::ParseError, file: &PathBuf, code: &str) {
215 use annotate_snippets::{215 use annotate_snippets::{
216 display_list::{DisplayList, FormatOptions},216 display_list::{DisplayList, FormatOptions},
217 snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation},217 snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation},