Skip to content

Commit

Permalink
meta: rename craters
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Mar 27, 2024
1 parent 7a4a2a5 commit 2d800a7
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 26 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[workspace]
members = [
"frontend_csv",
"codegen",
"cmd",
"lncodegen-csvlang",
"lncodegen-codegen",
"lncodegen-cli",
]

resolver = "2"
6 changes: 3 additions & 3 deletions cmd/Cargo.toml → lncodegen-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "lncodegen"
name = "lncodegen-cli"
version = "0.1.0"
edition = "2021"

[dependencies]
clap = { version = "4.0.12", features = [ "derive" ] }
log = "0.4"
env_logger = "0.9.1"
codegen = { path = "../codegen/"}
frontend_csv = { path = "../frontend_csv/" }
codegen = { path = "../lncodegen-codegen/"}
csvlang = { path = "../lncodegen-csvlang/" }
fundamentals = { version = "0.0.1-alpha.1" }
hex = "0.4.3"
radicle-term = { git = "https://github.com/radicle-dev/heartwood.git" }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Implementing the Code generator base on the CSV file.
use crate::gen::CodeGenMethod;

use codegen::codegen::CodeGen;
use codegen::rust::RustCodeGen;
use frontend_csv::parser::parser::Parser;
use frontend_csv::scanner::scanner::Scanner;
use csvlang::parser::parser::Parser;
use csvlang::scanner::scanner::Scanner;

pub struct CSVCodeGen {
pub lang: String,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion codegen/Cargo.toml → lncodegen-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
frontend_csv = { path = "../frontend_csv/" }
csvlang = { path = "../lncodegen-csvlang/" }
indoc = "1.0.7"
convert_case = "0.5.0"
log = "0.4"
Expand Down
3 changes: 2 additions & 1 deletion codegen/src/codegen.rs → lncodegen-codegen/src/codegen.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Code Generation module implementation
use std::collections::BTreeMap;

use frontend_csv::parser::ast::{LNMsData, LNMsg, LNMsgType, LNSubType, LNTlvRecord};
use log::debug;

use csvlang::parser::ast::{LNMsData, LNMsg, LNMsgType, LNSubType, LNTlvRecord};

/// Code Gen trait that specify all the basic method to create a new
/// code generation target to encode and decode a lightning network message.
///
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 8 additions & 4 deletions codegen/src/rust.rs → lncodegen-codegen/src/rust.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
//! Rust code generation for the lightning
//! network specification.
use super::codegen::CodeGen;
use std::collections::BTreeMap;
use std::fmt::Display;

use convert_case::{Case, Casing};
use frontend_csv::parser::ast::{LNMsData, LNMsg, LNMsgType, LNTlvRecord};
use std::{collections::BTreeMap, fmt::Display};

use csvlang::parser::ast::{LNMsData, LNMsg, LNMsgType, LNTlvRecord};

use super::codegen::CodeGen;

pub struct RustCodeGen {
#[allow(dead_code)]
Expand Down Expand Up @@ -115,7 +119,7 @@ impl<'g> CodeGen<'g> for RustCodeGen {

fn write_u32(&mut self, _: &LNMsData) {}

fn build_u64(&mut self, field: &frontend_csv::parser::ast::LNMsData) {
fn build_u64(&mut self, field: &csvlang::parser::ast::LNMsData) {
if let LNMsData::Uint64(name) = field {
let code = fmt_struct_filed!(name, "u64");
self.file_content += self.add_identation_to_code(&code).as_str();
Expand Down
2 changes: 1 addition & 1 deletion frontend_csv/Cargo.toml → lncodegen-csvlang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "frontend_csv"
name = "csvlang"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2d800a7

Please sign in to comment.