Skip to content

Commit

Permalink
Add column layout and drag-n-drop reordering of sections
Browse files Browse the repository at this point in the history
  • Loading branch information
acweathersby committed Sep 26, 2024
1 parent e79fad8 commit 58b73fd
Show file tree
Hide file tree
Showing 12 changed files with 782 additions and 1,217 deletions.
14 changes: 0 additions & 14 deletions crates/radlr-test/bytecode/test_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,20 +783,6 @@ fn json_parser() -> RadlrResult<()> {
)
}

#[test]
fn rum_raw_parser() -> RadlrResult<()> {
let grammar_source_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("../../../lib_rum_common/crates/language/grammar/raw/raw.radlr")
.canonicalize()
.unwrap();
compile_and_run_grammars2(
&[std::fs::read_to_string(grammar_source_path.as_path())?.as_str()],
grammar_source_path,
&[("raw_expression", r##"2+2"##, true), ("raw_expression", r##"2*8"##, true)],
Default::default(),
)
}

#[test]
fn handles_grammars_that_utilize_eof_symbol() -> RadlrResult<()> {
compile_and_run_grammars(
Expand Down
26 changes: 16 additions & 10 deletions site/assets/js/lab/index.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
import * as pipeline from "./pipeline";
import radlr_init, * as radlr from "js/radlr/radlr_wasm.js";
import { EditorField } from "./journal_elements";
import { NB, NBEditorField } from "./journal_elements";

export async function init(compiler_worker_path: string) {
radlr_init();

let nb = new NB(2);

pipeline.GrammarDB.worker_path = compiler_worker_path;

let grammar_input = new EditorField("Grammar");
let grammar_input = nb.addField(new NBEditorField("Grammar"))
grammar_input.setContentVisible(true);
grammar_input.setText("<> name > \"names\"+");

let grammar_input2 = nb.addField(new NBEditorField("Grammar"))
grammar_input2.setContentVisible(true);
grammar_input2.setText("<> name > \"names\"+");

let bytecode_output = new EditorField("Bytecode Output");
let bytecode_output = nb.addField(new NBEditorField("Bytecode Output"), 1);
bytecode_output.setContentVisible(false);

let parser_input = new EditorField("Parser Input");

pipeline.GrammarDB.worker_path = compiler_worker_path;

let parser_input = nb.addField(new NBEditorField("Parser Input"), 1);
parser_input.setContentVisible(true);

let formatting_rules = new EditorField("Formatting Rules");
let highlighting_rules = new EditorField("Highlighting Rules");
let ast_atat = new EditorField("Ascript AST @@");
let formatting_rules = new NBEditorField("Formatting Rules");
let highlighting_rules = new NBEditorField("Highlighting Rules");
let ast_atat = new NBEditorField("Ascript AST @@");

ast_atat.setText("temp");

Expand All @@ -32,7 +39,6 @@ export async function init(compiler_worker_path: string) {
parser_input.addMsg(0, 5, "test1");
parser_input.addMsg(5, 4, "test2");

grammar_input.setText("<> name > \"names\"+");


grammar_input.addListener("text_changed", grammar_input => {
Expand Down
Loading

0 comments on commit 58b73fd

Please sign in to comment.