Various progress, doesnt compile
Added prelude, made lambdas a single-token prefix like NS, made progress on implementations, removed const line type
This commit is contained in:
@@ -59,7 +59,7 @@ pub struct ParsedMember {
|
||||
#[derive(Clone, Debug, Coding)]
|
||||
pub enum ParsedMemberKind {
|
||||
Constant(ParsedConstId),
|
||||
Module(Vec<ParsedLine>),
|
||||
Module { lines: Vec<ParsedLine>, use_prelude: bool },
|
||||
}
|
||||
|
||||
/// Obtain the value of a parsed constant. This is guaranteed to be called after
|
||||
|
||||
@@ -5,7 +5,7 @@ use orchid_api_derive::{Coding, Hierarchy};
|
||||
use orchid_api_traits::Request;
|
||||
use ordered_float::NotNan;
|
||||
|
||||
use crate::{CharFilter, ExtHostReq, HostExtNotif, HostExtReq, MemberKind, TStr};
|
||||
use crate::{CharFilter, ExtHostReq, HostExtNotif, HostExtReq, MemberKind, TStr, TStrv};
|
||||
|
||||
/// ID of a system type
|
||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Coding)]
|
||||
@@ -63,6 +63,7 @@ pub struct NewSystemResponse {
|
||||
pub lex_filter: CharFilter,
|
||||
pub line_types: Vec<TStr>,
|
||||
pub const_root: HashMap<TStr, MemberKind>,
|
||||
pub prelude: Vec<TStrv>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Coding, Hierarchy)]
|
||||
|
||||
@@ -27,7 +27,7 @@ pub struct TokenTree {
|
||||
#[derive(Clone, Debug, Coding)]
|
||||
pub enum Token {
|
||||
/// Lambda function head, from the opening \ until the beginning of the body.
|
||||
LambdaHead(Vec<TokenTree>),
|
||||
LambdaHead(Box<TokenTree>),
|
||||
/// A name segment or an operator.
|
||||
Name(TStr),
|
||||
/// A newly generated expression. The last place this is supposed to happen is
|
||||
|
||||
Reference in New Issue
Block a user