Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
8127e88
gen: use repo_url constant for code-generated header
on-keyday May 1, 2026
15c4947
gen: ebm2c dedupe variant/union and emit nested struct_union types
on-keyday May 1, 2026
b31e7fc
ebm: replace url and add parent_struct for PropertyDecl
on-keyday May 1, 2026
c145226
ebmgen: add parent_struct for PropertyDecl
on-keyday May 1, 2026
60a8d85
ebmcodegen: support property for get_struct_union_member_from_field
on-keyday May 1, 2026
ec60530
lsp: add completion (keywords, scope-walked idents, member access)
on-keyday May 1, 2026
217e67a
web: wire completion in playground LSP (Monaco)
on-keyday May 1, 2026
ac45351
chore: update CodeQL workflow to include 'github-actions' in language…
on-keyday May 3, 2026
2f1d4c6
ci: add sisakulint workflow for linting GitHub Actions
on-keyday May 3, 2026
3587aaf
ci: add reviewdog setup to sisakulint workflow
on-keyday May 3, 2026
692e348
ci: remove unnecessary blank line in sisakulint workflow
on-keyday May 3, 2026
cf0d413
fix???
on-keyday May 3, 2026
206e019
fix: update CodeQL language matrix to use 'actions' instead of 'githu…
on-keyday May 3, 2026
5efaf82
fix: add timeout ignore option to sisakulint command in workflow
on-keyday May 3, 2026
0e3ac63
Potential fix for pull request finding 'CodeQL / Workflow does not co…
on-keyday May 3, 2026
355901b
fix: correct indentation in permissions section of sisakulint workflow
on-keyday May 3, 2026
0652360
fix: remove sisakulint workflow configuration
on-keyday May 3, 2026
e4ba73c
fix: auto-fix .github/workflows/codeql.yml with sisakulint
sisakulint[bot] May 3, 2026
0016933
fix: restructure WAVE format definitions for clarity and correctness
on-keyday May 4, 2026
eff66e4
Merge branch 'gen/fix-wasm-src2json' of github.com:on-keyday/brgen in…
on-keyday May 4, 2026
bea3717
fix: add handling for sizes greater than 64 in bit_holder and create …
on-keyday May 7, 2026
c149c56
Revert "gen: ebm2c dedupe variant/union and emit nested struct_union …
on-keyday May 11, 2026
fec39ce
fix: update property handling to include parent_struct in union_prope…
on-keyday May 14, 2026
949d713
fix: update Debug ebm2cpp configuration to use ebm2c and wasm.ebm input
on-keyday May 14, 2026
213a667
fix: update function declaration handling and modify union structure …
on-keyday May 14, 2026
b965f3a
ebm: replace cast_function to cast_call in TypeCastDesc and related f…
on-keyday May 14, 2026
efceb76
feat: add TLP format definitions and headers for traffic management
on-keyday May 19, 2026
dd0f810
fix: update SegmentRouting to use RoutingType and adjust related calc…
on-keyday May 20, 2026
9589dd2
fix: comment out set_srv6_segments function in SegmentRouting for fut…
on-keyday May 20, 2026
bded326
ebm: use cast_call instead of cast_function to reduce boilerplate in …
on-keyday May 20, 2026
e2d4646
feat: add LLC, SNAP, and LLCSnap header formats for protocol definition
on-keyday May 22, 2026
fee988a
fix: add IPV6 entry to ProtocolNumber enum
on-keyday May 22, 2026
7043327
fix: update LLCHeader to use ServiceAccessPoint enum for dsap and ssap
on-keyday May 22, 2026
b422ffe
fix: add lldp entry to EtherType enum
on-keyday May 22, 2026
50703ab
fix: correct typo in SNAPHeader field name from 'out' to 'oui'
on-keyday May 22, 2026
15f5f7b
fix: handle STRUCT->INT FUNCTION_CAST and array length type in ebmgen
on-keyday May 23, 2026
9f5906b
fix: cross-backend wasm_src2json fixes (python, go, escape, .bgn)
on-keyday May 23, 2026
04c3598
fix: TYPE_CAST FUNCTION_CAST wrap result in destination cast when typ…
on-keyday May 23, 2026
790b41f
fix(ebm2go): re-anchor inner-anon-struct property access to outer rec…
on-keyday May 23, 2026
e8e9d9b
fix(ebm2go): inline type assertion for variant member access
on-keyday May 23, 2026
f4a69c0
fix(ebmgen): emit INIT_CHECK chain for nested-variant property accessors
on-keyday May 23, 2026
c0c57fc
fix(ebm2rust): emit Variant{id} enum + handle FUNCTION_CAST in TYPE_CAST
on-keyday May 23, 2026
7b36e94
fix(ebm2rust): relocate inner-anon accessors + VARIANT cast handling
on-keyday May 24, 2026
98175e1
fix(ebm2rust): clone read accessors, setter call for writes, byte lit…
on-keyday May 24, 2026
75350f1
fix(ebm2zig): declare pure VARIANT types as union(enum)
on-keyday May 24, 2026
e59347c
chore(ebm2zig): dump error return trace in test_runner harness
on-keyday May 24, 2026
b2a66e1
fix(ebmcodegen,ebm2cpp): rename composite_field_decl hook + add cpp a…
on-keyday May 24, 2026
be15cb4
fix(ebm2cpp): stop emitting variant-member structs nested inside parent
on-keyday May 24, 2026
86119bb
fix(ebm2cpp): parent_struct-prefix inner-anon property accessors
on-keyday May 24, 2026
2dd1b67
fix(ebm2cpp): finish wasm_src2json — relocate inner accessors + VARIA…
on-keyday May 24, 2026
40cd1fb
docs(adr): record design decisions from wasm_src2json multi-backend fix
on-keyday May 24, 2026
7595d61
fix(ebm2zig): set tools as global default so the zig shim resolves cw…
on-keyday May 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "21 18 * * 0"

permissions:
contents: read

jobs:
analyze:
name: Analyze
Expand All @@ -35,24 +32,21 @@ jobs:
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: ["c-cpp", "go"]
language: ["c-cpp", "go", "actions"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

timeout-minutes: 5
# Initializes the CodeQL tools for scanning.

# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -75,30 +69,36 @@ jobs:
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
- name: Set up Ninja
uses: seanmiddleditch/gha-setup-ninja@7e868db0f3406270dd46e1dac26c65f621456723 # master
if: matrix.language != 'c-cpp'
timeout-minutes: 5
- name: Set up Clang
uses: egor-tensin/setup-clang@8092a31dc33b0c41ee7cc5bb81fd0267490a0161 # v2.2
if: matrix.language == 'c-cpp'
timeout-minutes: 5
with:
version: latest
platform: x64
- name: Install libc++-dev and libc++abi-dev
timeout-minutes: 5
run: sudo apt-get install libc++-dev libc++abi-dev -y
- name: Initialize CodeQL
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
timeout-minutes: 5
with:
languages: ${{ matrix.language }}
debug: true
- name: Build C++ and Go
if: matrix.language == 'c-cpp' || matrix.language == 'go'
timeout-minutes: 5
run: |
env | grep -E "CODEQL|LD_PRELOAD|CC|CXX"
export FUTILS_CXX_COMPILER=$CXX
export FUTILS_C_COMPILER=$CC
ldd $(which clang)
FUTILS_DIR=./utils python build.py native
./tool/src2json --version

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
timeout-minutes: 5
with:
category: "/language:${{matrix.language}}"
1 change: 0 additions & 1 deletion .harness-worktrees/b2993c56fd9620106c99858da64455f8
Submodule b2993c56fd9620106c99858da64455f8 deleted from a61e25
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@
"name": "Debug ebm2cpp",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceRoot}/rebrgen/tool/ebmgen",
"args": ["-i", "${workspaceRoot}/rebrgen/save/stream.bgn"],
"program": "${workspaceRoot}/rebrgen/tool/ebm2c",
"args": ["-i", "${workspaceRoot}/rebrgen/save/wasm.ebm"],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/rebrgen",
"environment": [],
Expand Down
2 changes: 2 additions & 0 deletions astlib/ast2c/ast.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ struct ast2c_RawScope {
size_t ident_size;
void* owner;
int branch_root;
ast2c_Loc loc;
};

struct ast2c_RawNode {
Expand Down Expand Up @@ -1520,6 +1521,7 @@ struct ast2c_Scope {
size_t ident_size;
ast2c_Node* owner;
int branch_root;
ast2c_Loc loc;
};

// returns 1 if succeed 0 if failed
Expand Down
2 changes: 2 additions & 0 deletions astlib/ast2csharp/ast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ public class Scope {
public List<Ident>? Ident{get;set;}
public Node? Owner{get;set;}
public bool BranchRoot{get;set;}
public Loc Loc{get;set;}
}
public struct Pos {
public ulong Begin{get;set;}
Expand All @@ -883,6 +884,7 @@ public class RawScope {
public List<ulong>? Ident{get;set;}
public ulong? Owner{get;set;}
public bool BranchRoot{get;set;}
public Loc Loc{get;set;}
}
public class RawNode {
public NodeType NodeType{get;set;}
Expand Down
2 changes: 2 additions & 0 deletions astlib/ast2dart/lib/ast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ class Scope {
List<Ident>? ident = [];
Node? owner;
bool branchRoot = false;
Loc loc = Loc();
factory Scope.fromJson(Map<String, dynamic> json) => _$ScopeFromJson(json);
}
@JsonSerializable()
Expand Down Expand Up @@ -1028,6 +1029,7 @@ class RawScope {
List<int> ident = [];
int? owner;
bool branchRoot = false;
Loc loc = Loc();
factory RawScope.fromJson(Map<String, dynamic> json) => _$RawScopeFromJson(json);
}
@JsonSerializable()
Expand Down
3 changes: 3 additions & 0 deletions astlib/ast2go/ast/ast.go

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

4 changes: 4 additions & 0 deletions astlib/ast2py/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ class Scope:
ident: List[Ident]
owner: Optional[Node]
branch_root: bool
loc: Loc


class Pos:
Expand Down Expand Up @@ -780,6 +781,7 @@ class RawScope:
ident: List[int]
owner: Optional[int]
branch_root: bool
loc: Loc

def parse_RawScope(json: dict) -> RawScope:
ret = RawScope()
Expand All @@ -801,6 +803,7 @@ def parse_RawScope(json: dict) -> RawScope:
else:
ret.owner = None
ret.branch_root = bool(json["branch_root"])
ret.loc = parse_Loc(json["loc"])
return ret


Expand Down Expand Up @@ -2371,6 +2374,7 @@ def ast2node(ast :JsonAst) -> Program:
if ast.scope[i].owner is not None:
scope[i].owner = ast.node[ast.scope[i].owner]
scope[i].branch_root = ast.scope[i].branch_root
scope[i].loc = ast.scope[i].loc
return node[0]

def walk(node: Node, f: Callable[[Callable,Node],None]) -> None:
Expand Down
5 changes: 5 additions & 0 deletions astlib/ast2rust/core/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9507,6 +9507,7 @@ pub struct Scope {
pub ident: Vec<Weak<RefCell<Ident>>>,
pub owner: Option<NodeWeak>,
pub branch_root: bool,
pub loc: Loc,
}

#[derive(Debug,Clone,Copy,Serialize,Deserialize)]
Expand Down Expand Up @@ -9538,6 +9539,7 @@ pub struct RawScope {
pub ident: Vec<usize>,
pub owner: Option<usize>,
pub branch_root: bool,
pub loc: Loc,
}

#[derive(Debug,Clone,Serialize,Deserialize)]
Expand Down Expand Up @@ -10325,6 +10327,7 @@ pub fn parse_ast(ast:JsonAst)->Result<Rc<RefCell<Program>> ,Error>{
ident: Vec::new(),
owner: None,
branch_root: false,
loc: Loc{ pos: Pos{ begin: 0, end: 0 }, file: 0, line: 0, col: 0 },
}));
scopes.push(scope);
}
Expand Down Expand Up @@ -15900,6 +15903,8 @@ pub fn parse_ast(ast:JsonAst)->Result<Rc<RefCell<Program>> ,Error>{
};
scope.borrow_mut().ident.push(Rc::downgrade(ident));
}
scope.borrow_mut().branch_root = raw_scope.branch_root;
scope.borrow_mut().loc = raw_scope.loc;
}

match nodes.get(0){
Expand Down
Loading
Loading