forked from Orchid/orchid
Commit pending merge
This commit is contained in:
@@ -3,7 +3,7 @@ use std::ops::RangeInclusive;
|
||||
use orchid_api_derive::{Coding, Hierarchy};
|
||||
use orchid_api_traits::Request;
|
||||
|
||||
use crate::{ExtHostReq, HostExtReq, OrcResult, ParsId, SysId, TStr, TokenTree};
|
||||
use crate::{ExtHostReq, HostExtReq, OrcResult, ParsId, SysId, TStr, TStrv, TokenTree};
|
||||
|
||||
/// - All ranges contain at least one character
|
||||
/// - All ranges are in increasing characeter order
|
||||
@@ -18,6 +18,8 @@ pub struct LexExpr {
|
||||
pub id: ParsId,
|
||||
pub text: TStr,
|
||||
pub pos: u32,
|
||||
/// Source root module path
|
||||
pub src: TStrv,
|
||||
}
|
||||
impl Request for LexExpr {
|
||||
type Response = Option<OrcResult<LexedExpr>>;
|
||||
|
||||
@@ -17,8 +17,6 @@ pub enum Location {
|
||||
Gen(CodeGenInfo),
|
||||
/// Range and file
|
||||
SourceRange(SourceRange),
|
||||
/// Range only, file implied. Most notably used by parsers
|
||||
Range(Range<u32>),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Coding)]
|
||||
|
||||
@@ -13,7 +13,11 @@ pub struct ParsId(pub NonZeroU64);
|
||||
#[extends(HostExtReq)]
|
||||
pub struct ParseLine {
|
||||
pub sys: SysId,
|
||||
/// The immediately enclosing module path
|
||||
pub module: TStrv,
|
||||
/// The root module path for the snipppet of source code, prefix of
|
||||
/// [ParseLine#module]
|
||||
pub src: TStrv,
|
||||
pub comments: Vec<Comment>,
|
||||
pub exported: bool,
|
||||
pub line: Vec<TokenTree>,
|
||||
|
||||
Reference in New Issue
Block a user