Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 💡 rename chumsky to nrs_lang #19

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/index.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Ok;
use nrs_language_server::{
chumsky::{parse, ParserResult},
nrs_lang::{parse, ParserResult},
semantic_analyze,
};

Expand Down
2 changes: 1 addition & 1 deletion src/completion.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::HashMap;

use crate::chumsky::{Expr, Func, Spanned};
use crate::nrs_lang::{Expr, Func, Spanned};
pub enum ImCompleteCompletionItem {
Variable(String),
Function(String, Vec<String>),
Expand Down
129 changes: 0 additions & 129 deletions src/jump_definition.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod chumsky;
pub mod completion;
pub mod nrs_lang;
pub mod semantic_analyze;
pub mod semantic_token;
pub mod span;
Expand Down
12 changes: 6 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use std::collections::HashMap;

use dashmap::DashMap;
use log::debug;
use nrs_language_server::chumsky::{
use nrs_language_server::completion::completion;
use nrs_language_server::nrs_lang::{
parse, type_inference, Ast, ImCompleteSemanticToken, ParserResult,
};
use nrs_language_server::completion::completion;
use nrs_language_server::semantic_analyze::{analyze_program, IdentType, Semantic};
use nrs_language_server::semantic_token::LEGEND_TYPE;
use nrs_language_server::span::Span;
Expand Down Expand Up @@ -315,10 +315,10 @@ impl LanguageServer for Backend {
k.start,
k.end,
match v {
nrs_language_server::chumsky::Value::Null => "null".to_string(),
nrs_language_server::chumsky::Value::Bool(_) => "bool".to_string(),
nrs_language_server::chumsky::Value::Num(_) => "number".to_string(),
nrs_language_server::chumsky::Value::Str(_) => "string".to_string(),
nrs_language_server::nrs_lang::Value::Null => "null".to_string(),
nrs_language_server::nrs_lang::Value::Bool(_) => "bool".to_string(),
nrs_language_server::nrs_lang::Value::Num(_) => "number".to_string(),
nrs_language_server::nrs_lang::Value::Str(_) => "string".to_string(),
},
)
})
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/semantic_analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use rust_lapper::{Interval, Lapper};
use std::fmt::Display;

use crate::{
chumsky::{Ast, Expr, Func},
nrs_lang::{Ast, Expr, Func},
span::Span,
symbol_table::{ReferenceId, SymbolId, SymbolTable},
};
Expand Down
4 changes: 2 additions & 2 deletions src/semantic_token.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::collections::HashMap;

use tower_lsp::lsp_types::{SemanticTokenType};
use tower_lsp::lsp_types::SemanticTokenType;

use crate::chumsky::{Expr, Func, ImCompleteSemanticToken, Spanned};
use crate::nrs_lang::{Expr, Func, ImCompleteSemanticToken, Spanned};

pub const LEGEND_TYPE: &[SemanticTokenType] = &[
SemanticTokenType::FUNCTION,
Expand Down