diff --git a/src/rappel/evaluator.gleam b/src/rappel/evaluator.gleam index 0b68557..722aaf8 100644 --- a/src/rappel/evaluator.gleam +++ b/src/rappel/evaluator.gleam @@ -100,10 +100,6 @@ pub fn start() -> Subject(Message) { subj } -type Token - -type ParseResult - type EvalResult { Value(Dynamic, BindingStruct) } @@ -170,6 +166,10 @@ pub fn resolve_import(str: String) -> List(#(String, String)) { ] } +type Token + +type ParseResult + @external(erlang, "rappel_ffi", "scan_string") fn scan_string(str: Charlist) -> Result(List(Token), #(Dynamic, Dynamic)) diff --git a/src/rappel/generator.gleam b/src/rappel/generator.gleam index 647896e..52fb65a 100644 --- a/src/rappel/generator.gleam +++ b/src/rappel/generator.gleam @@ -461,12 +461,6 @@ fn generate_pattern(pattern: Pattern) -> GenerateResult { } } } - // let joined_arguments = - // arguments - // |> list.map(fn(arg) { - // }) - // |> string.join(", ") - // "{" <> constructor_name <> ", " <> joined_arguments <> "}" } fn generate_fn_parameter(param: FnParameter) -> String { diff --git a/src/rappel/lsp/client.gleam b/src/rappel/lsp/client.gleam index 0cccb61..82db6f7 100644 --- a/src/rappel/lsp/client.gleam +++ b/src/rappel/lsp/client.gleam @@ -1,6 +1,3 @@ -//// REQUEST -//// RESPONSE - import gleam/dynamic.{Dynamic} import gleam/int import gleam/json @@ -9,62 +6,6 @@ import gleam/option.{Option} import gleam/result import gleam/string -// interface Message { -// jsonrpc: string; -// } -// interface RequestMessage extends Message { -// -// /** -// * The request id. -// */ -// id: integer | string; -// -// /** -// * The method to be invoked. -// */ -// method: string; -// -// /** -// * The method's params. -// */ -// params?: array | object; -// } - -// interface ResponseMessage extends Message { -// /** -// * The request id. -// */ -// id: integer | string | null; -// -// /** -// * The result of a request. This member is REQUIRED on success. -// * This member MUST NOT exist if there was an error invoking the method. -// */ -// result?: string | number | boolean | array | object | null; -// -// /** -// * The error object in case a request fails. -// */ -// error?: ResponseError; -// } -// interface ResponseError { -// /** -// * A number indicating the error type that occurred. -// */ -// code: integer; -// -// /** -// * A string providing a short description of the error. -// */ -// message: string; -// -// /** -// * A primitive or structured value that contains additional -// * information about the error. Can be omitted. -// */ -// data?: string | number | boolean | array | object | null; -// } - // TODO: make this a proper ADT pub type Request { Request(id: Int, method: String, params: Map(String, Dynamic))