diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..1bb51288 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +{ + "image": "ghcr.io/lonrun/codefuse-query-tutorial:0.6", + "hostRequirements": { + "cpus": 4 + }, + "customizations": { + "codespaces": { + "openFiles": [ + "tutorial/README.md" + ] + }, + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-toolsai.jupyter", + "MS-CEINTL.vscode-language-pack-zh-hans", + "CodeFuse-Query.codefuse-query-extension" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 404fc3f9..a557a69b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -43,6 +43,8 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems working-directory: '${{ github.workspace }}/doc' + - name: Generate COREF API Documents + run: python3 tools/build.py - name: Setup Pages id: pages uses: actions/configure-pages@v3 diff --git a/README.md b/README.md index 48478c57..6bc3553b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,12 @@ Open Issues + + Release Download + + + VSCode Plugin +

## 什么是CodeFuse-Query? @@ -54,7 +60,7 @@ CodeFuse-Query 包括**Sparrow CLI **和CodeFuse-Query**在线服务Query中心* 注:以上语言状态的成熟程度判断标准是根据COREF包含的信息种类和实际落地情况来进行判定,除了OC/C++外,所有语言均支持了完整的AST信息和Documentation信息,以Java为例,COREF for Java还支持了ASG、Call Graph、Class Hierarchy、以及部分CFG信息。 ## 使用场景 ### 查询代码特征 -小开发同学想知道 Repo A 里面使用了哪些 String 型的变量,所以他写了一个 Godel 如下,交给 CodeFuse-Query 系统给他返回了结果。 +小开发同学想知道 Repo A 里面使用了哪些 String 型的变量,所以他写了一个 Gödel 如下,交给 CodeFuse-Query 系统给他返回了结果。 ```rust // script use coref::java::* @@ -76,7 +82,7 @@ fn main() { 小 TL 同学发现团队总是写出很多类似的 Bug A,**他想针对 Bug A 制定一个代码规则和其检查器**,并在 CodeReview 阶段做个卡点。小 TL 通过在 CodeFuse-Query 平台上面编写了一段分析 Query,在平台上面测试符合要求,把这段分析 Query 固化下来作为一个代码规则,并上线到了 CodeReview/CI 阶段。从此这个 Bug 再也没发生过了。 类似需求:编写静态缺陷扫描规则进行代码风险拦截。 ### 获取统计数据 -小研究发现传统的代码复杂度指标很难准确地衡量代码的复杂情况,通过学习国际先进经验加上自我灵光一闪,设计了一套复杂度指标和算法。通过 Godel 实现出来以后,**发现不怎么优化就已经性能非常高了**,很快就应用到了 10 几种语言,11+万个仓库当中去了。马上就对代码仓库整体的复杂度有了深入的了解。相比较以前需要自己解析代码,分析语法树,对接系统,**不知道方便了多少。** +小研究发现传统的代码复杂度指标很难准确地衡量代码的复杂情况,通过学习国际先进经验加上自我灵光一闪,设计了一套复杂度指标和算法。通过 Gödel 实现出来以后,**发现不怎么优化就已经性能非常高了**,很快就应用到了 10 几种语言,11+万个仓库当中去了。马上就对代码仓库整体的复杂度有了深入的了解。相比较以前需要自己解析代码,分析语法树,对接系统,**不知道方便了多少。** 类似需求:代码统计,代码度量,算法设计,学术研究。 ## 应用领域 @@ -110,14 +116,18 @@ CodeFuse-Query为CodeFuse代码大模型提供了以下数据清洗能力: - [引言](./doc/1_abstract.md) - [概述](./doc/2_introduction.md) - [安装、配置、运行](./doc/3_install_and_run.md) -- [Godel查询语言介绍](./doc/4_godelscript_language.md) +- [Gödel查询语言介绍](./doc/4_godelscript_language.md) - [VSCode开发插件](./doc/5_toolchain.md) +## 教程 (tutorial) +- [在线教程](./tutorial/README.md) + ## 目录结构说明 - `cli`:命令行工具的入口,提供统一的命令行接口,调用其他模块完成具体功能 - `language`:各语言的数据化核心(extractor)和数据建模(lib)。关于开放度的问题,请参见《关于开源范围的一些说明》章节 - `doc`:参考文档 -- `examples`:Godel 查询语言示例 +- `examples`:Gödel 查询语言示例 +- `tutorial`:CodeFuse-Query 开发容器使用教程 ## 关于开源范围的一些说明 截止目前,从源码**不能**构建出可执行的程序,原因在于本次开源并没有开放所有的模块,缺少的模块会在之后的一年陆续开源。尽管如此,为保障完整的体验,我们开放了**完整的安装包**下载,请见Release页面。 @@ -134,3 +144,9 @@ CodeFuse-Query为CodeFuse代码大模型提供了以下数据清洗能力: | SQL | N | N | BETA | | Swift | N | N | BETA | | Properties | N | N | BETA | + +## 联系我们 +![微信用户群图片](./assets/wechat_qrcode_1214.JPG) +## Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=codefuse-ai/CodeFuse-Query&type=Date)](https://star-history.com/#codefuse-ai/CodeFuse-Query&Date) diff --git a/assets/wechat_qrcode_1214.JPG b/assets/wechat_qrcode_1214.JPG new file mode 100644 index 00000000..b7f4990e Binary files /dev/null and b/assets/wechat_qrcode_1214.JPG differ diff --git a/cli/extractor/extractor.py b/cli/extractor/extractor.py index 290257dd..205efe6e 100644 --- a/cli/extractor/extractor.py +++ b/cli/extractor/extractor.py @@ -31,11 +31,11 @@ def __init__(self): def cfamily_extractor_cmd(source_root, database, options): - cmd = list() - cmd += [str(Extractor.cfamily_extractor)] - cmd += ["--compile-commands=", str(source_root)] - cmd += ["--output-db-path=", str(database)] - return cmd + return [ + str(Extractor.cfamily_extractor), + f"--compile-commands={source_root}", + f"--output-db-path={database}" + ] def go_extractor_cmd(source_root, database, options): diff --git a/doc/1_abstract.md b/doc/1_abstract.md index 81f68660..d21dc424 100644 --- a/doc/1_abstract.md +++ b/doc/1_abstract.md @@ -1,7 +1,9 @@ 随着大规模软件开发的普及,对可扩展且易于适应的静态代码分析技术的需求正在加大。传统的静态分析工具,如 Clang Static Analyzer (CSA) 或 PMD,在检查编程规则或样式问题方面已经展现出了良好的效果。然而,这些工具通常是为了满足特定的目标而设计的,往往无法满足现代软件开发环境中多变和多元化的需求。这些需求可以涉及服务质量 (QoS)、各种编程语言、不同的算法需求,以及各种性能需求。例如,安全团队可能需要复杂的算法,如上下文敏感的污点分析,来审查较小的代码库,而项目经理可能需要一种相对较轻的算法,例如计算圈复杂度的算法,以在较大的代码库上测量开发人员的生产力。 + 这些多元化的需求,加上大型组织中常见的计算资源限制,构成了一项重大的挑战。由于传统工具采用的是问题特定的计算方式,往往无法在这种环境中实现扩展。因此,我们推出了 CodeQuery,这是一个专为大规模静态分析设计的集中式数据平台。 在 CodeQuery 的实现中,我们把源代码和分析结果看作数据,把执行过程看作大数据处理,这与传统的以工具为中心的方法有着显著的不同。我们利用大型组织中的常见系统,如数据仓库、MaxCompute 和 Hive 等数据计算设施、OSS 对象存储和 Kubernetes 等灵活计算资源,让 CodeQuery 能够无缝地融入这些系统中。这种方法使 CodeQuery 高度可维护和可扩展,能够支持多元化的需求,并有效应对不断变化的需求。此外,CodeQuery 的开放架构鼓励各种内部系统之间的互操作性,实现了无缝的交互和数据交换。这种集成和交互能力不仅提高了组织内部的自动化程度,也提高了效率,降低了手动错误的可能性。通过打破信息孤岛,推动更互联、更自动化的环境,CodeQuery 显著提高了软件开发过程的整体生产力和效率。 此外,CodeQuery 的以数据为中心的方法在处理静态源代码分析的领域特定挑战时具有独特的优势。例如,源代码通常是一个高度结构化和互联的数据集,与其他代码和配置文件有强烈的信息和连接。将代码视为数据,CodeQuery 可以巧妙地处理这些问题,这使得它特别适合在大型组织中使用,其中代码库持续但逐步地进行演变,大部分代码在每天进行微小的改动同时保持稳定。 CodeQuery 还支持如基于代码数据的商业智能 (BI) 这类用例,能生成报告和仪表板,协助监控和决策过程。此外,CodeQuery 在分析大型语言模型 (LLM) 的训练数据方面发挥了重要作用,提供了增强这些模型整体效果的深入见解。 + 在当前的静态分析领域,CodeQuery 带来了一种新的范式。它不仅满足了大规模、复杂的代码库分析需求,还能适应不断变化和多元化的静态分析场景。CodeQuery 的以数据为中心的方法,使得其在处理大数据环境中的代码分析问题时具有独特优势。CodeQuery 的设计,旨在解决大规模软件开发环境中的静态分析问题。它能够将源代码和分析结果视作数据,使得其可以灵活地融入大型组织的各种系统中。这种方法不仅可以有效地处理大规模的代码库,还可以应对各种复杂的分析需求,从而使得静态分析工作变得更加高效和准确。 CodeQuery 的特点和优势可以概括为以下几点: diff --git a/doc/4_godelscript_language.md b/doc/4_godelscript_language.md index 5f228b76..916b5800 100644 --- a/doc/4_godelscript_language.md +++ b/doc/4_godelscript_language.md @@ -1,5 +1,31 @@ # GödelScript 查询语言 +## 目录 + +- [GödelScript 基本概念和语法](#gödelscript-基本概念和语法) + - [简介](#简介) + - [基本程序构成](#基本程序构成) + - [基础类型和编译器内建函数](#基础类型和编译器内建函数) + - [函数](#函数) + - [语句](#语句) + - [Schema](#schema) + - [数据库](#数据库) + - [Trait](#trait) + - [Import](#import) + - [Query](#query) + - [Ungrounded Error: 未赋值/未绑定错误](#ungrounded-error-未赋值未绑定错误) +- [查询示例](#查询示例) + - [Java](#java) + - [Python](#python) + - [JavaScript](#javascript) + - [XML](#xml) + - [Go](#go) +- [查询调试和优化技巧](#查询调试和优化技巧) + - [Schema 传参导致笛卡尔积过大](#schema-传参导致笛卡尔积过大) + - [多层 for 导致笛卡尔积过大](#多层-for-导致笛卡尔积过大) + - [不要滥用`@inline`](#不要滥用inline必须用inline的优化策略) +- [在本机使用查询脚本流程](#在本机使用查询脚本流程) + ## GödelScript 基本概念和语法 ### 简介 @@ -15,13 +41,13 @@ fn main() { } ``` -GödelScript 是 CodeQuery 用于查询和数据处理的领域专用语言 (DSL)。GödelScript 使用了类 Rust 的语法,提供了严格的类型检查、方便快捷的类型推导、智能友好的错误提示信息,使用户能够快速上手。 +GödelScript 即 Gödel 查询语言。GödelScript 是 CodeQuery 用于查询和数据处理的领域专用语言 (DSL)。GödelScript 使用了类 Rust 的语法,提供了严格的类型检查、方便快捷的类型推导、智能友好的错误提示信息,使用户能够快速上手。 GödelScript 编译器主要应用场景为: 1. 面向用户编写简单或复杂查询,提供更便捷的写法,提高编写查询的效率; 2. 提供严格类型检查与类型推导,给予更智能的代码修改提示; -3. 提供严格的 [ungrounded](#ungrounded-error) 检测,避免容易触发的 Soufflé Ungrounded Error; +3. 提供严格的 [ungrounded(未赋值/未绑定)](#ungrounded-error-未赋值未绑定错误) 检测,避免触发 Soufflé Ungrounded Error; 4. Language Server 以及 IDE Extension 支持。 ### 基本程序构成 @@ -30,13 +56,13 @@ GödelScript 编译器主要应用场景为: GödelScript 程序可能包含: -- 模块和符号[引用语句](#import) -- Schema [类型声明](#schema) -- 数据库[类型声明](#数据库) -- Trait [声明](#trait) -- [方法实现](#方法实现) -- 函数[声明和实现](#函数) -- Query [声明](#query) +- [模块和符号引用](#import) +- [Schema 类型声明](#schema) +- [数据库类型声明](#数据库) +- [Trait 声明](#trait) +- [Schema 方法实现](#方法实现) +- [函数声明和实现](#函数) +- [Query 声明](#query) 包含以上所有组成内容的样例: @@ -99,17 +125,14 @@ GödelScript 采用类 C 语言的注释方式。 /* * 1. 多行注释 * 2. 多行注释 -* 3. 多行注释 */ ``` #### `main` 函数 -GödelScript 查询脚本可以包含`main`函数,该函数无返回值。 - -在`main`中可以多次使用`output(...)`来表明要输出多个查询结果。 +GödelScript 查询脚本可以包含`main`函数,该函数无返回值。在不实现`main`函数,且没有写 query 声明的情况下,程序不会输出。 -`main`函数只允许使用`output`,其他语句会导致编译错误。 +更多详细内容请看 [main 函数](#gödelscript-main-函数)。 ```rust fn main() { @@ -118,11 +141,9 @@ fn main() { } ``` -在不实现`main`函数,且没有写 query 声明的情况下,程序不会输出。 - ### 基础类型和编译器内建函数 -GödelScript 包含基础类型`int``string`,`bool`属于基础类型,但是不能作为值存储。 +GödelScript 包含基础类型`int` `string`,`bool`属于基础类型,但是不能作为值存储。 #### `int`类型 native 函数 @@ -204,7 +225,7 @@ GödelScript 包含基础类型`int``string`,`bool`属于基础类型,但是 | to | (self) -> T | 转换到其他类型的 schema,采用 duck type 检测。 | | is | (self) -> bool | 判断是否可以是其他类型的 schema,采用 duck type 检测。如果自身 schema 有主键,则底层只会通过主键判断是否可以是其他类型。 | | key_eq | (self, T) -> bool | 检查两个 schema 实例的主键是否相等。 | -| key_neq | (self, T) -> bool | 检查两个 schema 实例的主键是否**不**相等。 | +| key_neq | (self, T) -> bool | 检查两个 schema 实例的主键是否不等。 | schema native 函数实例: @@ -232,42 +253,101 @@ fn convert() -> *ElementParent { ### 函数 -#### `main` 函数 +#### GödelScript `main` 函数 -在上文中已经提及,该函数是 GödelScript 中唯一不需要声明返回值的函数。 +`main`函数是 GödelScript 中唯一不声明返回值的函数。`main`函数只允许使用`output`,其他语句会导致编译错误;多次使用`output(...)`可以输出多个查询结果,查询结果会分表显示,表名即为`output`中调用的查询函数的函数名。 #### 查询函数 查询函数的返回值类型推荐为`bool`,需要输出查询结果时,需要使用`output()`函数。 +在`output()`中调用的查询函数不再是常规思路中的用传参调用函数。参数列表在此时会变化为输出表的表结构,下面是两个查询函数的应用实例: + +1. 单表`output` + + 单表`output`特指在`main`函数中,只使用一次`output`来输出。 + + ```rust + fn example(a: int, b: string) -> bool {...} + + fn main() { + output(example()) // 此时参数列表变为输出表结构,不需要传参 + } + ``` + + 对应的输出表结构为: + + ```json + [ + {"a": 0, "b": "xxx"}, + {"a": 1, "b": "xxx"} + ] + ``` + +2. 多表`output` + + 多表`output`是指在`main`函数中,使用多次`output`来输出。在这种情况下,输出数据会附带对应的表名。 + + ```rust + fn example0(a: int, b: string) -> bool {...} + fn example1(a: string, b: int) -> bool {...} + + fn main() { + output(example0()) + output(example1()) + } + ``` + + 对应的输出表结构为: + + ```json + { + "example0":[ + {"a": 0, "b": "xxx"}, + {"a": 1, "b": "xxx"} + ], + "example1":[ + {"a": "xxx", "b": 0}, + {"a": "xxx", "b": 1} + ] + } + ``` + +下面是一个比较详细的例子,在这个例子中,我们直接构造了两组数据并输出。在下列代码中,需要注意的是: + +1. GödelScript 中,布尔值可以使用`true`和`false`关键字。 + +2. `=`符号在 GödelScript 中是比较特殊的符号,不能用常规的编程语言的思路来理解。GödelScript 是一种 Datalog 语言。在这里,`=`符号同时具备两种语义,一个是 __赋值__ 一个是 __判等__。详情可看[`=`运算符](#赋值和判等运算符)。 + +3. 在这个例子的条件语句中,`a`和`b`均使用了`=`的赋值语义,因为`int`和`string`类型参数在函数体中被认为是`ungrounded(未赋值/未绑定)`,必须要被赋值才能使用。 + +4. `=`赋值语句的返回值是`true`。 + ```rust -fn myQuery(a: int, b: string) -> bool { - if (a = 1 && b = "hello") { +fn example(a: int, b: string) -> bool { + // = 符号同时具有赋值和比较的功能,取决于此时的左值是否已经“被赋值” + // 这里的 a 和 b 所用的 = 符号均是赋值语义 + if (a = 1 && b = "1") { + // GödelScript 使用关键字 true 和 false 来表示布尔值 return true } - if (...) { - ... + if (a = 2 && b = "2") { + return true } - ... } fn main() { - output(myQuery()) // 这里无需填写传入参数 + output(example()) } ``` -`output()`会根据该函数的参数列表格式来输出表结构。所以在`main`中使用时,`output()`并不需要你提供这个函数的传入参数。对应的输出表结构大致如下: +预期的输出结果应该为: -| a | b | -| --- | --- | -| 1 | "hello" | -| ... | ... | - -GödelScript 使用`true`和`false`关键字来代表返回的`bool`类型结果: - -```rust -return true -return false +```json +[ + {"a": 1, "b": "1"}, + {"a": 2, "b": "2"} +] ``` #### 普通函数 @@ -352,11 +432,70 @@ if (f.getName().contains("util") || f.getName().contains("com")) { 条件可以使用这些逻辑运算符进行连接:`!`取反,`||`或,`&&`与。 -条件中的比较运算符:`>`大于,`<`小于,`>=`大于等于,`<=`小于等于,`=`等于,`!=`不等于。 +条件中的比较运算符:`>`大于,`<`小于,`>=`大于等于,`<=`小于等于,`=`等于或者赋值,`!=`不等于。 常规算术运算可以使用如下运算符:`+`加法,`-`减法/取负,`*`乘法,`/`除法。 -**注意:比较运算符中的**`**=**`**在左侧变量没有被绑定数据时,会执行绑定操作并返回**`**true**`**,类似于赋值操作。** +##### 赋值和判等运算符`=` + +`=`符号在 GödelScript 中具有两种不同的语义:赋值和判等,具体的语义需要分情况进行讨论: + +1. 赋值 + + 赋值一般出现在`int` `string`这类基础类型的变量参数上,这类变量作为函数的参数出现时,一般被认为是未赋值的。而具有这类变量的函数被调用时,传入的参数,实际上是作为筛选条件存在。 + + ```rust + fn example(a: int) -> bool { + // 这里比较反直觉,在过程式语言中,这里通常会被认为是判断 a == 1 + // 但是在 datalog 方言中,datalog 的每个函数实际上都是在算一个中间表 (view) + // 所以这个函数本质上是生成了一个 view,数据为 [{"a": 1}] + return a = 1 // assign a = 1 + } + + fn test() -> bool { + // 这里看似是在通过传参让 a = 2,实际上并不是 + // example() 自己会返回 view: [{"a": 1}] + // 然后通过 a = 2 来约束结果,可以看到,我们这里没有拿到任何结果 + // 所以返回了 false + return example(2) // false + } + ``` + +2. 判等 + + 对于 schema 类型来说,任何一个 schema 背后都有一个全集,所以参数列表中的 schema 类型一般被认为是已经被赋值的。对于已经赋值的变量来说,`=`就是判等操作。 + + ```rust + // 声明 schema + schema A {...} + + // 实现 schema 的成员函数 + impl A { + // 这里定义了 schema A 的全集 + @data_constraint + pub fn __all__() -> *A {...} + } + + fn example(a: A) -> bool { + for(temp in A::__all__()) { + if (a = temp) { + return true + } + } + } + ``` + + 同样,对于中间声明的有初始值的`int`或者`string`,`=`也是判等操作。 + + ```rust + fn example() -> bool { + let (a = 1) { // assign a = 1 + if (a = 1) { // compare a = 1 + return true + } + } + } + ``` #### match 语句 @@ -382,9 +521,9 @@ fn a() -> int { } fn b() -> *int { - yield 1 - yield 2 - yield 3 + yield 1 + yield 2 + yield 3 } ``` @@ -422,9 +561,9 @@ GödelScript 使用如下方式来声明和实现`schema`的相关方法: impl File { // 静态方法 fn f1() -> ... {...} - // 成员方法,第一个参数必须为 self - fn f2(self) -> ... {...} - ... + // 成员方法,第一个参数必须为 self + fn f2(self) -> ... {...} + ... } ``` ##### 静态方法 @@ -564,7 +703,7 @@ schema File { impl File { @data_constraint fn __all__() -> *File {...} - fn getId(self) -> int {...} + fn getId(self) -> int {...} fn staticMethod() -> string {return "File"} } @@ -833,11 +972,11 @@ database MyDB { ```rust query example from - coref::java::Location loc in coref::java::Location(coref::java::JavaDB::load("...")) + coref::java::Location loc in coref::java::Location(coref::java::JavaDB::load("...")) where - ... + ... select - ... + ... ``` - schema 静态方法调用 @@ -857,12 +996,12 @@ Query 用于进行一些简单的查询,编写的 query 一定会被输出, ```rust query 名字 from - 变量名 in 初始值, + 变量名 in 初始值, 变量名 in 初始值, 变量名 in 初始值 where 条件 select 值 as 输出的列名 - 值 as 输出的列名, + 值 as 输出的列名, 值 as 输出的列名, 值 as 输出的列名 ``` @@ -873,7 +1012,7 @@ from 列表中的变量声明无需加上类型标注,编译器会进行自动 ```rust query hello_world from - info in "hello world" + info in "hello world" select info as greeting ``` @@ -944,19 +1083,19 @@ fn class_method(className: string, methodName: string, methodSignature: string) } ``` -### Ungrounded Error +### Ungrounded Error: 未赋值/未绑定错误 -GödelScript 会将未与集合绑定的符号判定为`ungrounded`。基本判定规则为: +GödelScript 会将未与数据绑定的符号判定为`ungrounded(未赋值/未绑定)`。基本判定规则为: - 未初始化的/未被使用的/未与集合绑定的符号 - - 未被绑定的`int``string`参数 + - 未被绑定的`int` `string`参数 - 未被使用的 database 类型的参数 - 函数体有语句,但是没有任何返回语句 - 在取非运算块中进行绑定的符号 - 例如 `!(__tmp = 1)`,`__tmp`会被认为是未绑定的 - 在取非运算块中调用 inline 函数或数据构造函数 -#### 未使用的 database/基础类型参数 +#### 1. 未使用的 database/基础类型参数 函数代码块中,如果有一个语句分支没有使用参数中的`database`或者基础类型参数,则一定会导致`ungrounded`: @@ -977,7 +1116,7 @@ impl XXX { if (self.hasAttribute(attributeName)) { return self.getValueByAttributeName(attributeName) } - if (!self.hasAttribute(attributeName) { + if (!self.hasAttribute(attributeName)) { return "null" } } @@ -990,7 +1129,7 @@ fn xxx() -> xx { } ``` -#### 函数体有语句的情况下无返回语句 +#### 2. 函数体有语句的情况下无返回语句 GödelScript 允许一个函数体不包含任何语句,即空函数体。但是如果函数体中有其他语句,则 GödelScript 会要求必须有至少一个返回语句,否则就会出现 ungrounded error。 @@ -1004,7 +1143,7 @@ fn test() -> int { } ``` -#### 取非运算块中使用 inline 函数或数据构造函数 +#### 3. 取非运算块中使用 inline 函数或数据构造函数 上文提到了可以通过`@inline`注解来规避 ungrounded error。但是如果在取非运算中使用了含有该注解的函数,则必然会导致 ungrounded error。 @@ -1028,7 +1167,7 @@ if (!check(for_test())) { } ``` -#### 对链式调用的取非运算 +#### 4. 对链式调用的取非运算 GödelScript 未对该情况执行`ungrounded`检测,但是该写法会导致在 Soufflé 中报`ungrounded`错误: @@ -1112,7 +1251,7 @@ fn main() { use coref::java::* fn default_java_db() -> JavaDB { - return JavaDB::load("coref_java_src.db") + return JavaDB::load("coref_java_src.db") } /** @@ -1129,7 +1268,7 @@ fn class_hierarchy(className : string, superClassName : string) -> bool { } fn main() { - output(class_hierarchy()) + output(class_hierarchy()) } ``` @@ -1140,7 +1279,7 @@ fn main() { use coref::java::* fn default_java_db() -> JavaDB { - return JavaDB::load("coref_java_src.db") + return JavaDB::load("coref_java_src.db") } // Find all methods of the class @@ -1154,7 +1293,7 @@ fn methods(className : string, methodName : string) -> bool { } fn main() { - output(methods()) + output(methods()) } ``` @@ -2077,7 +2216,7 @@ fn getByIndex(self) -> Expression { return e } } - } + } } ``` @@ -2086,9 +2225,9 @@ e, p 的笛卡尔积就变成了 e, i 的笛卡尔积,从运算的层面来看 ### 不要滥用`@inline`/必须用`@inline`的优化策略 inline 函数的底层机制是在**调用处展开**,如果该函数不存在大量的 schema 传参,并且在很多位置都被调用,inline 可能会导致**编译结果膨胀且重复计算次数指数级增加**,有时反而不利于减少运行时间。 -如果存在必须要使用 inline 的情况 (比如规避 ungrounded),但是使用之后反而出现运行速度变慢的情况,可以采取将内嵌语句拆分为 predicate 的方式来避免展开导致的编译结果膨胀。 +如果存在必须要使用 inline 的情况 (比如规避`ungrounded`),但是使用之后反而出现运行速度变慢的情况,可以采取将内嵌语句拆分为 predicate 的方式来避免展开导致的编译结果膨胀。 -下面的例子中,`getValueByAttributeNameByDefaultValue`为了避免`attributeName`被识别为 ungrounded 所以标注 inline,后续在 if 分支中添加了一个条件语句,但是导致了执行时间从 3 秒变成 35 秒: +下面的例子中,`getValueByAttributeNameByDefaultValue`为了避免`attributeName`被识别为`ungrounded`所以标注`inline`,后续在 if 分支中添加了一个条件语句,但是导致了执行时间从 3 秒变成 35 秒: ```rust impl XmlElementBase { diff --git a/doc/5_toolchain.md b/doc/5_toolchain.md index 6788c4e7..ef5cd4cc 100644 --- a/doc/5_toolchain.md +++ b/doc/5_toolchain.md @@ -79,5 +79,7 @@ code --install-extension [扩展vsix文件路径] - `godelScript.libraryDirectoryPath` - 用于指定 GödelScript 的库文件夹路径,默认为空。需要时请替换为 GödelScript 库文件夹绝对路径。 - 如果已经下载 Sparrow CLI ,则库文件夹路径为 `[sparrow cli root]/lib-1.0`。 -# 智能助手 + +# 智能助手 + 待开放,尽情期待! diff --git a/doc/Gemfile.lock b/doc/Gemfile.lock index 9ac9a9b5..2ded23cf 100644 --- a/doc/Gemfile.lock +++ b/doc/Gemfile.lock @@ -74,6 +74,7 @@ GEM webrick (1.8.1) PLATFORMS + arm64-darwin-21 arm64-darwin-23 x86_64-linux diff --git a/doc/index.md b/doc/index.md index 12d00830..c6cb84c8 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,10 +1,11 @@ --- title: Home -layout: home +layout: default +nav_order: 1 --- ## 文档 (Documentation) - [引言](1_abstract.md) - [概述](2_introduction.md) - [安装、配置、运行](3_install_and_run.md) -- [Godel查询语言介绍](4_godelscript_language.md) +- [GödelScript 查询语言介绍](4_godelscript_language.md) - [VSCode开发插件](5_toolchain.md) diff --git a/doc/tools/build.py b/doc/tools/build.py new file mode 100644 index 00000000..d661ba8b --- /dev/null +++ b/doc/tools/build.py @@ -0,0 +1,21 @@ +import subprocess + +print("Download Sparrow CLI") +subprocess.run([ + "curl", + "-L", + "https://github.com/codefuse-ai/CodeFuse-Query/releases/download/2.0.2/sparrow-cli-2.0.2.linux.tar.gz", + "-o", + "sparrow-cli.tar.gz" +]) +subprocess.run([ + "tar", + "-xvzf", + "sparrow-cli.tar.gz" +]) +print("Copy ../assets into ./doc/assets") +subprocess.run(["cp", "-r", "../assets", "./"]) +print("Concat coref library from ../language into ./.coref-api-build") +subprocess.run(["python3", "tools/generate_coref_library.py", "../language"]) +print("Generate markdown documents into ./godel-api") +subprocess.run(["python3", "tools/generate_markdown.py", "./sparrow-cli/godel-script/usr/bin/godel"]) \ No newline at end of file diff --git a/doc/tools/generate_coref_library.py b/doc/tools/generate_coref_library.py new file mode 100644 index 00000000..1fd9ad5c --- /dev/null +++ b/doc/tools/generate_coref_library.py @@ -0,0 +1,28 @@ +import sys +import os + +if len(sys.argv) != 2: + print("Usage: python this_file.py language_library_directory") + exit(-1) + +input_language_dir = sys.argv[1] + +print("Generate library from", input_language_dir) +if not os.path.exists("./.coref-api-build"): + os.mkdir("./.coref-api-build") + +mapper = { + "coref.go.gdl": input_language_dir + "/go/lib", + "coref.java.gdl": input_language_dir + "/java/lib", + "coref.javascript.gdl": input_language_dir + "/javascript/lib", + "coref.python.gdl": input_language_dir + "/python/lib", + "coref.xml.gdl": input_language_dir + "/xml/lib", +} + +for key in mapper.keys(): + output_file = "./.coref-api-build/" + key + result = "" + for root, ignored, files in os.walk(mapper[key]): + for file in files: + result += open(root + "/" + file, "r").read() + "\n" + open(output_file, "w").write(result) \ No newline at end of file diff --git a/doc/tools/generate_markdown.py b/doc/tools/generate_markdown.py new file mode 100644 index 00000000..d54b3632 --- /dev/null +++ b/doc/tools/generate_markdown.py @@ -0,0 +1,310 @@ +import subprocess +import json +import os +import sys + +def delete_head_spaces(comment: str) -> str: + if comment.find("//") == 0: + return comment + result = "" + for string in comment.split("\n"): + temp = "" + is_space_flag = True + for ch in string: + if is_space_flag and (ch == ' ' or ch == '\t'): + continue + is_space_flag = False + temp += ch + result += temp + "\n" + if result[-1] == "\n": + return result[:-1] + return result + +def match_schema_comment(comment_list, schema) -> str: + schema_location = schema["location"] + for comment in comment_list: + comment_location = comment["location"] + if comment_location[3] < schema_location[1]-1: + continue + if comment_location[3] > schema_location[1]: + continue + return delete_head_spaces(comment["content"]) + return "" + +def match_comment(comment_list, function) -> str: + function_location = function["location"] + for comment in comment_list: + comment_location = comment["location"] + if comment_location[3] < function_location[1]-1: + continue + if comment_location[3] > function_location[1]: + continue + return delete_head_spaces(comment["content"]) + return "" + +def raw_string(name: str) -> str: + name = name.replace("_", "\\_") + name = name.replace("<", "\\<") + name = name.replace(">", "\\>") + return name + +def dump_type(type_struct): + result = "*" if type_struct["is_set"] == "true" else "" + result += type_struct["name"] + return result + +def dump_function(function): + result = "pub fn " + function["name"] + "(" + for param in function["parameter"]: + result += param["name"] + ": " + result += dump_type(param["type"]) + ", " + if result[-1] == " ": + result = result[:-2] + result += ") -> " + result += dump_type(function["return"]) + ";" + return result + +def dump_function_parameter(function, link_dir = "./schema/", link_db_path = "./database.html") -> str: + basic_type = ["int", "float", "string", "bool"] + result = "" + for param in function["parameter"]: + result += "* Parameter `" + raw_string(param["name"]) + "`: " + if param["type"]["name"] in basic_type: + result += "`" + dump_type(param["type"]) + "`\n" + elif param["type"]["name"] in database_map.keys(): + result += "[`" + dump_type(param["type"]) + "`](" + link_db_path + ")\n" + else: + result += "[`" + dump_type(param["type"]) + "`](" + link_dir + param["type"]["name"] + ".html)\n" + if function["return"]["name"] in basic_type: + result += "* Return `" + dump_type(function["return"]) + "`\n" + elif function["return"]["name"] in database_map.keys(): + result += "* Return [`" + dump_type(function["return"]) + "`](" + link_db_path + ")\n" + else: + result += "* Return [`" + dump_type(function["return"]) + "`](" + link_dir + function["return"]["name"] + ".html)\n" + return result + +database_map = {} +def dump_database(database) -> str: + database_map[database["name"]] = 1 + result = "## " + database["name"] + "\n\n" + for table in database["table"]: + result += "* " + table["name"] + ": " + result += "[*" + table["type"]["name"] + "](./schema/" + table["type"]["name"] + ".html)\n" + return result + +def dump_schema(comment_list, schema) -> str: + result = "---\n" + result += "layout: default\n" + result += "---\n\n" + result += "# " + schema["name"] + "\n\n" + comment_of_schema = match_schema_comment(comment_list, schema) + if len(comment_of_schema) > 0: + result += "```java\n" + comment_of_schema + "\n```\n" + if len(schema["parent"]) > 0: + result += "Inherit from [" + schema["parent"] + "](" + "./" + schema["parent"] + ".html)\n\n" + for field in schema["fields"]: + if field["primary"]=="true": + result += "Primary key: `" + field["name"] + ": " + result += dump_type(field["type"]) + "`\n\n" + break + result += "```typescript\n" + result += "schema " + schema["name"] + if len(schema["parent"]) > 0: + result += " extends " + schema["parent"] + result += " {\n" + for field in schema["fields"]: + result += " " + if field["primary"]=="true": + result += "@primary " + result += field["name"] + ": " + result += dump_type(field["type"]) + ",\n" + if result[-2:] == ",\n": + result = result[:-2] + "\n" + result += "}\n" + result += "```\n" + for method in schema["methods"]: + if method["is_public"]=="false": + continue + if method["name"] in ["is", "to", "key_eq", "key_neq", "to_set"]: + continue + result += "## " + schema["name"] + "::" + raw_string(method["name"]) + "\n\n" + if method["name"] == "__all__": + result += "Data constraint method.\n\n" + comment = match_comment(comment_list, method) + if len(comment) > 0: + result += "```java\n" + comment + "\n```\n" + result += dump_function_parameter(method, "./", "../database.html") + "\n" + result += "```rust\n" + result += dump_function(method) + "\n" + result += "```\n" + return result + +def dfs_visit_schema_hierarchy(schema, schema_list, indent: str) -> str: + result = indent + "* [" + schema["name"] + "](./schema/" + schema["name"] + ".html)\n" + for i in schema_list: + if i["parent"] == schema["name"]: + result += dfs_visit_schema_hierarchy(i, schema_list, indent + " ") + return result + +def dump_schema_tree_view(schema_list) -> str: + root_schema = [] + for schema in schema_list: + if len(schema["parent"]) == 0: + root_schema.append(schema) + result = "" + for i in root_schema: + result += dfs_visit_schema_hierarchy(i, schema_list, "") + return result + +if len(sys.argv) != 2: + print("Usage: python this_file.py godel_script_executable_path") + exit(-1) + +godel_compiler_path = sys.argv[1] +markdown_output_path = "./godel-api" +input_file_directory = "./.coref-api-build" + +dirs = [ + "./godel-api", + "./godel-api/cfamily", + "./godel-api/go", + "./godel-api/java", + "./godel-api/javascript", + "./godel-api/properties", + "./godel-api/python", + "./godel-api/sql", + "./godel-api/xml", + "./godel-api/cfamily/schema", + "./godel-api/go/schema", + "./godel-api/java/schema", + "./godel-api/javascript/schema", + "./godel-api/properties/schema", + "./godel-api/python/schema", + "./godel-api/sql/schema", + "./godel-api/xml/schema" +] +for d in dirs: + if not os.path.exists(d): + os.mkdir(d) + +input_file_list = [] +for (path, dirname, filename) in os.walk(input_file_directory): + for file in filename: + input_file_list.append({"path": path, "name": file}) + +name_mapper = { + "coref.cfamily.gdl": "cfamily", + "coref.go.gdl": "go", + "coref.java.gdl": "java", + "coref.javascript.gdl": "javascript", + "coref.properties.gdl": "properties", + "coref.python.gdl": "python", + "coref.sql.gdl": "sql", + "coref.xml.gdl": "xml" +} + +semantic_dict = {} +for file in input_file_list: + file_full_path = file["path"] + "/" + file["name"] + print("Extract semantic info from " + file_full_path) + result = subprocess.run( + [godel_compiler_path, "--dump-lsp", file_full_path], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL + ) + if result.returncode!=0: + continue + semantic_dict[file["name"]] = result.stdout.decode("utf-8") + +def dump_reference_main_doc(): + output_file_path = markdown_output_path + "/coref_library_reference.md" + output_data = "---\n" + output_data += "title: \"COREF Library Reference\"\n" + output_data += "layout: default\n" + output_data += "nav_order: 2\n" + output_data += "has_children: true\n" + output_data += "---\n\n" + output_data += "# COREF Library Reference\n\n" + for file in input_file_list: + output_data += "* [coref::" + name_mapper[file["name"]] + "]" + output_data += "(./" + name_mapper[file["name"]] + "/reference.html)\n" + open(output_file_path, "w").write(output_data) + +dump_reference_main_doc() + +for file in input_file_list: + file_full_path = file["path"] + "/" + file["name"] + print("Generate markdown for " + file_full_path) + semantic_info = json.loads(semantic_dict[file["name"]]) + comment_list = semantic_info["comments"] + + output_data = "---\n" + output_data += "title: \"coref::" + name_mapper[file["name"]] + "\"\n" + output_data += "layout: default\n" + output_data += "has_children: true\n" + output_data += "parent: \"COREF Library Reference\"\n" + output_data += "---\n" + output_data += "# COREF Library Reference for " + name_mapper[file["name"]] + "\n\n" + output_data += "* coref::" + name_mapper[file["name"]] + " [database](./database.html)\n" + output_data += "* coref::" + name_mapper[file["name"]] + " [function](./function.html)\n" + output_data += "* coref::" + name_mapper[file["name"]] + " [schema](./schema.html)\n" + output_file_path = markdown_output_path + "/" + name_mapper[file["name"]] + "/reference.md" + open(output_file_path, "w").write(output_data) + + output_data = "---\n" + output_data += "title: \"database\"\n" + output_data += "layout: default\n" + output_data += "parent: \"coref::" + name_mapper[file["name"]] + "\"\n" + output_data += "grand_parent: \"COREF Library Reference\"\n" + output_data += "---\n" + output_data += "# Database of " + file["name"] + "\n\n" + database_list = semantic_info["semantic"]["database"] + for database in database_list: + output_data += dump_database(database) + output_file_path = markdown_output_path + "/" + name_mapper[file["name"]] + "/database.md" + print("Generate", output_file_path) + open(output_file_path, "w").write(output_data) + + function_list = semantic_info["semantic"]["function"] + output_data = "---\n" + output_data += "title: \"function\"\n" + output_data += "layout: default\n" + output_data += "parent: \"coref::" + name_mapper[file["name"]] + "\"\n" + output_data += "grand_parent: \"COREF Library Reference\"\n" + output_data += "---\n" + output_data += "# Global Function of " + file["name"] + "\n\n" + for function in function_list: + if len(function["location"][0]) == 0: + continue + if function["is_public"]=="false": + continue + output_data += "## " + function["name"] + "\n\n" + comment = match_comment(comment_list, function) + if len(comment) > 0: + output_data += "```java\n" + comment + "\n```\n" + output_data += dump_function_parameter(function) + "\n" + output_data += "```rust\n" + output_data += dump_function(function) + "\n" + output_data += "```\n" + output_file_path = markdown_output_path + "/" + name_mapper[file["name"]] + "/function.md" + print("Generate", output_file_path) + open(output_file_path, "w").write(output_data) + + schema_list = semantic_info["semantic"]["schema"] + print("Generate schema documents for", file_full_path, ":", len(schema_list)) + for schema in schema_list: + output_data = dump_schema(comment_list, schema) + output_file_path = markdown_output_path + "/" + name_mapper[file["name"]] + "/schema/" + schema["name"] + ".md" + open(output_file_path, "w").write(output_data) + + output_data = "---\n" + output_data += "title: \"schema\"\n" + output_data += "layout: default\n" + output_data += "parent: \"coref::" + name_mapper[file["name"]] + "\"\n" + output_data += "grand_parent: \"COREF Library Reference\"\n" + output_data += "---\n" + output_data += "# Schema of " + file["name"] + "\n\n" + output_data += dump_schema_tree_view(schema_list) + output_file_path = markdown_output_path + "/" + name_mapper[file["name"]] + "/schema.md" + open(output_file_path, "w").write(output_data) + print("Generate schema documents for", file_full_path, ": Done") \ No newline at end of file diff --git a/language/go/lib/CallableExpr.gdl b/language/go/lib/CallableExpr.gdl index d3029a45..5b129d7c 100644 --- a/language/go/lib/CallableExpr.gdl +++ b/language/go/lib/CallableExpr.gdl @@ -4,7 +4,7 @@ schema CallableExpr extends Expr { impl CallableExpr { @data_constraint @inline - fn __all__(db: GoDB) -> *CallableExpr { + pub fn __all__(db: GoDB) -> *CallableExpr { for (e in Expr(db)) { if (e.isCallorconversionExpr()) { yield CallableExpr { diff --git a/language/go/lib/Comment.gdl b/language/go/lib/Comment.gdl index e5e7f298..d7a2f234 100644 --- a/language/go/lib/Comment.gdl +++ b/language/go/lib/Comment.gdl @@ -4,7 +4,7 @@ schema Comment extends Node { impl Comment { @data_constraint @inline - fn __all__(db: GoDB) -> *Comment { + pub fn __all__(db: GoDB) -> *Comment { for (tmp in Node(db)) { for (c in CommentDO(db)) { if (tmp.key_eq(c)) { @@ -22,7 +22,7 @@ schema CommentGroup extends Node { impl CommentGroup { @data_constraint @inline - fn __all__(db: GoDB) -> *CommentGroup { + pub fn __all__(db: GoDB) -> *CommentGroup { for (tmp in Node(db)) { for (c in CommentGroupDO(db)) { if (tmp.key_eq(c)) { @@ -40,7 +40,7 @@ schema DocComment extends Node { impl DocComment { @data_constraint @inline - fn __all__(db: GoDB) -> *DocComment { + pub fn __all__(db: GoDB) -> *DocComment { for (tmp in Node(db)) { for (d in DocCommentDO(db)) { if (tmp.key_eq(d)) { diff --git a/language/go/lib/Declaration.gdl b/language/go/lib/Declaration.gdl index baa040d9..a74ec680 100644 --- a/language/go/lib/Declaration.gdl +++ b/language/go/lib/Declaration.gdl @@ -4,7 +4,7 @@ schema Decl extends Node { impl Decl { @data_constraint @inline - fn __all__(db: GoDB) -> *Decl { + pub fn __all__(db: GoDB) -> *Decl { for (tmp in Node(db)) { for (d in DeclDO(db)) { if (tmp.key_eq(d)) { @@ -107,7 +107,7 @@ schema ConstDecl extends Decl { impl ConstDecl { @data_constraint @inline - fn __all__(db: GoDB) -> *ConstDecl { + pub fn __all__(db: GoDB) -> *ConstDecl { for (tmp in Decl(db)) { for (d in DeclDO(db)) { if (tmp.key_eq(d)) { @@ -127,7 +127,7 @@ schema VarDecl extends Decl { impl VarDecl { @data_constraint @inline - fn __all__(db: GoDB) -> *VarDecl { + pub fn __all__(db: GoDB) -> *VarDecl { for (tmp in Decl(db)) { for (d in DeclDO(db)) { if (tmp.key_eq(d)) { diff --git a/language/go/lib/Expression.gdl b/language/go/lib/Expression.gdl index 53f16b1b..859f7301 100644 --- a/language/go/lib/Expression.gdl +++ b/language/go/lib/Expression.gdl @@ -4,7 +4,7 @@ schema Expr extends Node { impl Expr { @data_constraint @inline - fn __all__(db: GoDB) -> *Expr { + pub fn __all__(db: GoDB) -> *Expr { for (e in ExprDO(db)) { yield Expr { id : e.oid diff --git a/language/go/lib/Fields.gdl b/language/go/lib/Fields.gdl index 35972257..edc30ed8 100644 --- a/language/go/lib/Fields.gdl +++ b/language/go/lib/Fields.gdl @@ -4,7 +4,7 @@ schema Fields extends Node { impl Fields { @data_constraint @inline - fn __all__(db: GoDB) -> *Fields { + pub fn __all__(db: GoDB) -> *Fields { for (f in FieldsDO(db)) { yield Fields { id : f.oid diff --git a/language/go/lib/File.gdl b/language/go/lib/File.gdl index b14dd6a8..99221ca7 100644 --- a/language/go/lib/File.gdl +++ b/language/go/lib/File.gdl @@ -4,7 +4,7 @@ schema File extends Node { impl File { @data_constraint @inline - fn __all__(db: GoDB) -> *File { + pub fn __all__(db: GoDB) -> *File { for (f in FileDO(db)) { yield File { id : f.oid @@ -112,7 +112,7 @@ schema GoFile extends File { impl GoFile { @data_constraint @inline - fn __all__(db: GoDB) -> *GoFile { + pub fn __all__(db: GoDB) -> *GoFile { for (f in File(db)) { if (f.isGoFile()) { yield GoFile { diff --git a/language/go/lib/FileData.gdl b/language/go/lib/FileData.gdl index c63b49ad..ef3eaf07 100644 --- a/language/go/lib/FileData.gdl +++ b/language/go/lib/FileData.gdl @@ -4,7 +4,7 @@ schema FileData extends FileDataDO { impl FileData { @data_constraint @inline - fn __all__(db: GoDB) -> *FileData { + pub fn __all__(db: GoDB) -> *FileData { for (tmp in FileDataDO(db)) { yield FileData { oid : tmp.oid, diff --git a/language/go/lib/ForStmt.gdl b/language/go/lib/ForStmt.gdl index cb97745e..08ff367d 100644 --- a/language/go/lib/ForStmt.gdl +++ b/language/go/lib/ForStmt.gdl @@ -4,7 +4,7 @@ schema ForStmt extends Statement { impl ForStmt { @data_constraint @inline - fn __all__(db: GoDB) -> *ForStmt { + pub fn __all__(db: GoDB) -> *ForStmt { for (tmp in Statement(db)) { for (s in Statement(db)) { if (tmp = s) { diff --git a/language/go/lib/Function.gdl b/language/go/lib/Function.gdl index 799ee005..d72d1002 100644 --- a/language/go/lib/Function.gdl +++ b/language/go/lib/Function.gdl @@ -4,7 +4,7 @@ schema Function extends Node { impl Function { @data_constraint @inline - fn __all__(db: GoDB) -> *Function { + pub fn __all__(db: GoDB) -> *Function { for (tmp in Node(db)) { for (d in Decl(db)) { if (d.key_eq(tmp)) { diff --git a/language/go/lib/Location.gdl b/language/go/lib/Location.gdl index 6c99be72..9440df31 100644 --- a/language/go/lib/Location.gdl +++ b/language/go/lib/Location.gdl @@ -4,7 +4,7 @@ schema Location extends LocationDO { impl Location { @data_constraint @inline - fn __all__(db: GoDB) -> *Location { + pub fn __all__(db: GoDB) -> *Location { for (tmp in LocationDO(db)) { yield Location { oid : tmp.oid, diff --git a/language/go/lib/Method.gdl b/language/go/lib/Method.gdl index fa3fe3b9..5c8eda84 100644 --- a/language/go/lib/Method.gdl +++ b/language/go/lib/Method.gdl @@ -4,7 +4,7 @@ schema Method extends Function { impl Method { @data_constraint @inline - fn __all__(db: GoDB) -> *Method { + pub fn __all__(db: GoDB) -> *Method { for (f in Function(db)) { if (f.isMethod()) { yield Method { diff --git a/language/go/lib/Mod.gdl b/language/go/lib/Mod.gdl index 0789aa02..0360d748 100644 --- a/language/go/lib/Mod.gdl +++ b/language/go/lib/Mod.gdl @@ -4,7 +4,7 @@ schema Mod extends ModFileDO { impl Mod { @data_constraint @inline - fn __all__(db: GoDB) -> *Mod { + pub fn __all__(db: GoDB) -> *Mod { for (tmp in ModFileDO(db)) { yield Mod { oid : tmp.oid, diff --git a/language/go/lib/Node.gdl b/language/go/lib/Node.gdl index 70b08f1c..b601fb03 100644 --- a/language/go/lib/Node.gdl +++ b/language/go/lib/Node.gdl @@ -4,7 +4,7 @@ schema Node { impl Node { @data_constraint @inline - fn __all__(db: GoDB) -> *Node { + pub fn __all__(db: GoDB) -> *Node { for (d in DeclDO(db)) { yield Node {id : d.oid} } diff --git a/language/go/lib/Packages.gdl b/language/go/lib/Packages.gdl index d18b046d..3648444f 100644 --- a/language/go/lib/Packages.gdl +++ b/language/go/lib/Packages.gdl @@ -4,7 +4,7 @@ schema Pkg extends PkgDO { impl Pkg { @data_constraint @inline - fn __all__(db: GoDB) -> *Pkg { + pub fn __all__(db: GoDB) -> *Pkg { for (tmp in PkgDO(db)) { yield Pkg { oid : tmp.oid, diff --git a/language/go/lib/Receiver.gdl b/language/go/lib/Receiver.gdl index 33c6adef..4f6c226a 100644 --- a/language/go/lib/Receiver.gdl +++ b/language/go/lib/Receiver.gdl @@ -4,7 +4,7 @@ schema Receiver extends Method { impl Receiver { @data_constraint @inline - fn __all__(db: GoDB) -> *Receiver { + pub fn __all__(db: GoDB) -> *Receiver { for (m in Method(db)) { yield Receiver { id : m.id diff --git a/language/go/lib/ReternStmt.gdl b/language/go/lib/ReternStmt.gdl index ba1810dd..f72de178 100644 --- a/language/go/lib/ReternStmt.gdl +++ b/language/go/lib/ReternStmt.gdl @@ -4,7 +4,7 @@ schema ReturnStmt extends Statement { impl ReturnStmt { @data_constraint @inline - fn __all__(db: GoDB) -> *ReturnStmt { + pub fn __all__(db: GoDB) -> *ReturnStmt { for (s in Statement(db)) { if (s.isReturnStmt()) { yield ReturnStmt { diff --git a/language/go/lib/SelectorExpr.gdl b/language/go/lib/SelectorExpr.gdl index 4a1b0eda..4ed08116 100644 --- a/language/go/lib/SelectorExpr.gdl +++ b/language/go/lib/SelectorExpr.gdl @@ -4,7 +4,7 @@ schema Selector extends Expr { impl Selector { @data_constraint @inline - fn __all__(db: GoDB) -> *Selector { + pub fn __all__(db: GoDB) -> *Selector { for (tmp in Expr(db)) { yield Selector { id : tmp.id @@ -32,7 +32,7 @@ schema SelectorExpr extends Expr { impl SelectorExpr { @data_constraint @inline - fn __all__(db: GoDB) -> *SelectorExpr { + pub fn __all__(db: GoDB) -> *SelectorExpr { for (e in Expr(db)) { if (e.isSelectorExpr()) { yield SelectorExpr { diff --git a/language/go/lib/SliceExpr.gdl b/language/go/lib/SliceExpr.gdl index a77388af..541833a4 100644 --- a/language/go/lib/SliceExpr.gdl +++ b/language/go/lib/SliceExpr.gdl @@ -4,7 +4,7 @@ schema SliceExpr extends Expr { impl SliceExpr { @data_constraint @inline - fn __all__(db: GoDB) -> *SliceExpr { + pub fn __all__(db: GoDB) -> *SliceExpr { for (e in Expr(db)) { if (e.isSliceExpr()) { yield SliceExpr { diff --git a/language/go/lib/Spec.gdl b/language/go/lib/Spec.gdl index 0747a528..99c9e7d7 100644 --- a/language/go/lib/Spec.gdl +++ b/language/go/lib/Spec.gdl @@ -4,7 +4,7 @@ schema Spec extends Node { impl Spec { @data_constraint @inline - fn __all__(db: GoDB) -> *Spec { + pub fn __all__(db: GoDB) -> *Spec { for (s in SpecDO(db)) { yield Spec { id : s.oid @@ -80,7 +80,7 @@ schema ImportSpec extends Spec { impl ImportSpec { @data_constraint @inline - fn __all__(db: GoDB) -> *ImportSpec { + pub fn __all__(db: GoDB) -> *ImportSpec { for (s in Spec(db)) { if (s.isImportSpec()) { yield ImportSpec { @@ -118,7 +118,7 @@ schema TypeSpec extends Spec { impl TypeSpec { @data_constraint @inline - fn __all__(db: GoDB) -> *TypeSpec { + pub fn __all__(db: GoDB) -> *TypeSpec { for (s in Spec(db)) { if (s.isTypedefSpec()) { yield TypeSpec { @@ -145,7 +145,7 @@ schema ValueSpec extends Spec { impl ValueSpec { @data_constraint @inline - fn __all__(db: GoDB) -> *ValueSpec { + pub fn __all__(db: GoDB) -> *ValueSpec { for (s in Spec(db)) { if (s.isValueSpec()) { yield ValueSpec { @@ -239,7 +239,7 @@ schema LocalVaribleDecl extends Decl { impl LocalVaribleDecl { @data_constraint @inline - fn __all__(db: GoDB) -> *LocalVaribleDecl { + pub fn __all__(db: GoDB) -> *LocalVaribleDecl { for (d in Decl(db)) { if (d.isLocalVaribleDecl()) { yield LocalVaribleDecl { diff --git a/language/go/lib/Statement.gdl b/language/go/lib/Statement.gdl index 2a02ec54..bcd4c922 100644 --- a/language/go/lib/Statement.gdl +++ b/language/go/lib/Statement.gdl @@ -4,7 +4,7 @@ schema Statement extends Node { impl Statement { @data_constraint @inline - fn __all__(db: GoDB) -> *Statement { + pub fn __all__(db: GoDB) -> *Statement { for (tmp in Node(db)) { for (s in StmtDO(db)) { if (tmp.key_eq(s)) { diff --git a/language/go/lib/Type.gdl b/language/go/lib/Type.gdl index 4b337e8f..4ad909b9 100644 --- a/language/go/lib/Type.gdl +++ b/language/go/lib/Type.gdl @@ -4,7 +4,7 @@ schema Type extends TypeDO { impl Type { @data_constraint @inline - fn __all__(db: GoDB) -> *Type { + pub fn __all__(db: GoDB) -> *Type { for (tmp in TypeDO(db)) { yield Type { oid : tmp.oid, diff --git a/language/go/lib/Utils.gdl b/language/go/lib/Utils.gdl index 7161cf72..b93bfa3a 100644 --- a/language/go/lib/Utils.gdl +++ b/language/go/lib/Utils.gdl @@ -4,7 +4,7 @@ schema RuntimeInfo extends RuntimeInfoDO { impl RuntimeInfo { @data_constraint @inline - fn __all__(db: GoDB) -> *RuntimeInfo { + pub fn __all__(db: GoDB) -> *RuntimeInfo { for (tmp in RuntimeInfoDO(db)) { yield RuntimeInfo { oid : tmp.oid, diff --git a/language/go/lib/VariableUtils.gdl b/language/go/lib/VariableUtils.gdl index afc16138..a2df119a 100644 --- a/language/go/lib/VariableUtils.gdl +++ b/language/go/lib/VariableUtils.gdl @@ -4,7 +4,7 @@ schema DefineStmt extends Statement { impl DefineStmt { @data_constraint @inline - fn __all__(db: GoDB) -> *DefineStmt { + pub fn __all__(db: GoDB) -> *DefineStmt { for (s in Statement(db)) { if (s.isDefineStmt()) { yield DefineStmt { diff --git a/language/go/lib/Variables.gdl b/language/go/lib/Variables.gdl index b1afee6d..2223bf66 100644 --- a/language/go/lib/Variables.gdl +++ b/language/go/lib/Variables.gdl @@ -4,7 +4,7 @@ schema Literal extends LiteralDO { impl Literal { @data_constraint @inline - fn __all__(db: GoDB) -> *Literal { + pub fn __all__(db: GoDB) -> *Literal { for (tmp in LiteralDO(db)) { yield Literal { oid : tmp.oid, @@ -28,7 +28,7 @@ schema Variables extends Literal { impl Variables { @data_constraint @inline - fn __all__(db: GoDB) -> *Variables { + pub fn __all__(db: GoDB) -> *Variables { for (tmp in Literal(db)) { yield Variables { oid : tmp.oid, @@ -72,7 +72,7 @@ schema IOTALiteral extends Literal { impl IOTALiteral { @data_constraint @inline - fn __all__(db: GoDB) -> *IOTALiteral { + pub fn __all__(db: GoDB) -> *IOTALiteral { for (tmp in Literal(db)) { if (tmp.getValue() = "iota") { yield IOTALiteral { @@ -91,7 +91,7 @@ schema TypeName extends TypeNameDO { impl TypeName { @data_constraint @inline - fn __all__(db: GoDB) -> *TypeName { + pub fn __all__(db: GoDB) -> *TypeName { for (tmp in TypeNameDO(db)) { yield TypeName { oid : tmp.oid, diff --git a/language/go/lib/Writable.gdl b/language/go/lib/Writable.gdl index 44e853a8..0e9255c9 100644 --- a/language/go/lib/Writable.gdl +++ b/language/go/lib/Writable.gdl @@ -4,7 +4,7 @@ schema IncDecStmt extends Statement { impl IncDecStmt { @data_constraint @inline - fn __all__(db: GoDB) -> *IncDecStmt { + pub fn __all__(db: GoDB) -> *IncDecStmt { for (s in Statement(db)) { if (s.isIncStmt()) { yield IncDecStmt { @@ -25,7 +25,7 @@ schema AssignmentStmt extends Statement { impl AssignmentStmt { @data_constraint @inline - fn __all__(db: GoDB) -> *AssignmentStmt { + pub fn __all__(db: GoDB) -> *AssignmentStmt { for (s in Statement(db)) { if (s.isAssignStmt()) { yield AssignmentStmt { @@ -128,7 +128,7 @@ schema Writable extends Node { impl Writable { @data_constraint @inline - fn __all__(db: GoDB) -> *Writable { + pub fn __all__(db: GoDB) -> *Writable { for (n in Node(db)) { for (s in IncDecStmt(db)) { if (s.key_eq(n)) { @@ -178,7 +178,7 @@ schema WritesField { impl WritesField { @data_constraint @inline - fn __all__(db: GoDB) -> *WritesField { + pub fn __all__(db: GoDB) -> *WritesField { for (e in Expr(db)) { if (e.isSelectorExpr()) { yield WritesField {id : e.id} diff --git a/language/java/lib/Annotation.gdl b/language/java/lib/Annotation.gdl index aef22b5f..d547bcad 100644 --- a/language/java/lib/Annotation.gdl +++ b/language/java/lib/Annotation.gdl @@ -7,7 +7,7 @@ schema AnnotatedRelation extends AnnotatedRelationDO { impl AnnotatedRelation { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotatedRelation { + pub fn __all__(db: JavaDB) -> *AnnotatedRelation { for (tmp in AnnotatedRelationDO(db)) { yield AnnotatedRelation { annotation_hash_id : tmp.annotation_hash_id, @@ -44,7 +44,7 @@ schema AnnotationDo { impl AnnotationDo { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDo { + pub fn __all__(db: JavaDB) -> *AnnotationDo { for (a in AnnotationCanResolvedDO(db)) { yield AnnotationDo {id : a.element_hash_id} } @@ -177,7 +177,7 @@ schema Annotation extends AnnotationDo { impl Annotation { @data_constraint @inline - fn __all__(db: JavaDB) -> *Annotation { + pub fn __all__(db: JavaDB) -> *Annotation { for (tmp in AnnotationDo(db)) { yield Annotation { id : tmp.id @@ -233,7 +233,7 @@ schema AnnotationAccessArgumentDO { impl AnnotationAccessArgumentDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationAccessArgumentDO { + pub fn __all__(db: JavaDB) -> *AnnotationAccessArgumentDO { for (a in AnnotationAccessArgumentWithNameDO(db)) { yield AnnotationAccessArgumentDO {id : a.element_hash_id} } @@ -379,7 +379,7 @@ schema AnnotationAccessArgument extends AnnotationAccessArgumentDO { impl AnnotationAccessArgument { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationAccessArgument { + pub fn __all__(db: JavaDB) -> *AnnotationAccessArgument { for (tmp in AnnotationAccessArgumentDO(db)) { yield AnnotationAccessArgument { id : tmp.id @@ -524,7 +524,7 @@ schema AnnotationArrayInitializer extends AnnotationArrayInitializerDO { impl AnnotationArrayInitializer { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationArrayInitializer { + pub fn __all__(db: JavaDB) -> *AnnotationArrayInitializer { for (tmp in AnnotationArrayInitializerDO(db)) { yield AnnotationArrayInitializer { element_hash_id : tmp.element_hash_id, @@ -588,7 +588,7 @@ schema AnnotationDeclaration extends AnnotationDeclarationDO { impl AnnotationDeclaration { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDeclaration { + pub fn __all__(db: JavaDB) -> *AnnotationDeclaration { for (tmp in AnnotationDeclarationDO(db)) { yield AnnotationDeclaration { element_hash_id : tmp.element_hash_id, @@ -631,7 +631,7 @@ schema AnnotationDeclarationParameter extends AnnotationDeclarationParameterDO { impl AnnotationDeclarationParameter { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDeclarationParameter { + pub fn __all__(db: JavaDB) -> *AnnotationDeclarationParameter { for (tmp in AnnotationDeclarationParameterDO(db)) { yield AnnotationDeclarationParameter { element_hash_id : tmp.element_hash_id, @@ -697,7 +697,7 @@ schema AnnotationDeclarationParameterDefaultValue extends AnnotationDeclarationP impl AnnotationDeclarationParameterDefaultValue { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDeclarationParameterDefaultValue { + pub fn __all__(db: JavaDB) -> *AnnotationDeclarationParameterDefaultValue { for (tmp in AnnotationDeclarationParameterDefaultValueDO(db)) { yield AnnotationDeclarationParameterDefaultValue { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/Array.gdl b/language/java/lib/Array.gdl index ea07a194..8d1a08a0 100644 --- a/language/java/lib/Array.gdl +++ b/language/java/lib/Array.gdl @@ -14,7 +14,7 @@ schema ArrayCreationExpression extends Expression { impl ArrayCreationExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayCreationExpression { + pub fn __all__(db: JavaDB) -> *ArrayCreationExpression { for (tmp in Expression(db)) { for (ace in ArrayCreationExpressionDO(db)) { if (tmp.key_eq(ace)) { @@ -123,7 +123,7 @@ schema ArrayInitializerExpression extends Expression { impl ArrayInitializerExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayInitializerExpression { + pub fn __all__(db: JavaDB) -> *ArrayInitializerExpression { for (tmp in Expression(db)) { for (e in ArrayInitializerExpressionDO(db)) { if (tmp.key_eq(e)) { @@ -193,7 +193,7 @@ schema ArrayAccessExpression extends Expression { impl ArrayAccessExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayAccessExpression { + pub fn __all__(db: JavaDB) -> *ArrayAccessExpression { for (tmp in Expression(db)) { for (aae in ArrayAccessExpressionDO(db)) { if (tmp.key_eq(aae)) { @@ -248,7 +248,7 @@ schema Array extends ArrayDO { impl Array { @data_constraint @inline - fn __all__(db: JavaDB) -> *Array { + pub fn __all__(db: JavaDB) -> *Array { for (tmp in ArrayDO(db)) { yield Array { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/CallGraph.gdl b/language/java/lib/CallGraph.gdl index b650f738..61a394db 100644 --- a/language/java/lib/CallGraph.gdl +++ b/language/java/lib/CallGraph.gdl @@ -7,7 +7,7 @@ schema CallExpression extends Expression { impl CallExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallExpression { + pub fn __all__(db: JavaDB) -> *CallExpression { for (tmp in Expression(db)) { for (m in MethodAccessExpression(db)) { if (tmp.key_eq(m)) { @@ -144,7 +144,7 @@ schema LombokField extends Field { impl LombokField { @data_constraint @inline - fn __all__(db: JavaDB) -> *LombokField { + pub fn __all__(db: JavaDB) -> *LombokField { for (tmp in Field(db)) { for (a in Annotation(db)) { for (auto_tmp2 in tmp.getAnnotation()) { @@ -246,7 +246,7 @@ schema CallableBinding extends CallableBindingDO { impl CallableBinding { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallableBinding { + pub fn __all__(db: JavaDB) -> *CallableBinding { for (tmp in CallableBindingDO(db)) { yield CallableBinding { caller_hash_id : tmp.caller_hash_id, @@ -282,7 +282,7 @@ schema ExpressionList extends ExpressionListDO { impl ExpressionList { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionList { + pub fn __all__(db: JavaDB) -> *ExpressionList { for (tmp in ExpressionListDO(db)) { yield ExpressionList { element_hash_id : tmp.element_hash_id, @@ -341,7 +341,7 @@ schema ExpressionListExpressionRelation extends ExpressionListExpressionRelation impl ExpressionListExpressionRelation { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionListExpressionRelation { + pub fn __all__(db: JavaDB) -> *ExpressionListExpressionRelation { for (tmp in ExpressionListExpressionRelationDO(db)) { yield ExpressionListExpressionRelation { expression_list_hash_id : tmp.expression_list_hash_id, @@ -370,7 +370,7 @@ schema Callable { impl Callable { @data_constraint @inline - fn __all__(db: JavaDB) -> *Callable { + pub fn __all__(db: JavaDB) -> *Callable { for (m in Method(db)) { yield Callable {id : m.element_hash_id} } @@ -664,7 +664,7 @@ impl Callable { } for (tmp in Method(__all_data__)) { if (self.key_eq(tmp)) { - if (output4(n, tmp)) { + if (getCallerByMatchingCallsiteName(n, tmp)) { yield poly } } @@ -749,7 +749,7 @@ impl Callable { } for (tmp in Method(__all_data__)) { if (tmp.element_hash_id = c.id) { - if (output3(n, tmp)) { + if (getCallerByMatchingCallsiteName(n, tmp)) { yield c } } @@ -838,7 +838,7 @@ schema CallableEnclosingExpression extends CallableEnclosingExpressionDO { impl CallableEnclosingExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallableEnclosingExpression { + pub fn __all__(db: JavaDB) -> *CallableEnclosingExpression { for (tmp in CallableEnclosingExpressionDO(db)) { yield CallableEnclosingExpression { expression_hash_id : tmp.expression_hash_id, @@ -874,7 +874,7 @@ schema ReferenceElement extends ReferenceElementDO { impl ReferenceElement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceElement { + pub fn __all__(db: JavaDB) -> *ReferenceElement { for (tmp in ReferenceElementDO(db)) { yield ReferenceElement { element_hash_id : tmp.element_hash_id, @@ -934,7 +934,7 @@ schema AnonymousMethod extends Callable { impl AnonymousMethod { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnonymousMethod { + pub fn __all__(db: JavaDB) -> *AnonymousMethod { for (tmp in Callable(db)) { for (c in AnonymousClass(db)) { if (c.key_eq(tmp.getBelongedClass())) { @@ -984,9 +984,7 @@ pub fn isDirectCall(e : CallExpression) -> bool { } } } -pub fn output4(m : MethodAccessExpression, mm : Method) -> bool { - return output3(m, mm) -} + pub fn isAnonymousMethod(c : Callable) -> bool { for (m in AnonymousMethod(__all_data__)) { if (m.key_eq(c)) { @@ -994,7 +992,7 @@ pub fn isAnonymousMethod(c : Callable) -> bool { } } } -pub fn output3(m: MethodAccessExpression, tmp: Method) -> bool { +pub fn getCallerByMatchingCallsiteName(m: MethodAccessExpression, tmp: Method) -> bool { let (temp3 = tmp_deal_txt(m.getPrintableText())) { if (tmp.getName() = temp3.get_regex_match_result(".*\\.+(\\w+).*", 1)) { let (c = tmp.getBelongedClass()) { diff --git a/language/java/lib/Class.gdl b/language/java/lib/Class.gdl index a83f0b14..4c7f4d47 100644 --- a/language/java/lib/Class.gdl +++ b/language/java/lib/Class.gdl @@ -7,7 +7,7 @@ schema Class extends ClassDO { impl Class { @data_constraint @inline - fn __all__(db: JavaDB) -> *Class { + pub fn __all__(db: JavaDB) -> *Class { for (tmp in ClassDO(db)) { yield Class { element_hash_id : tmp.element_hash_id, @@ -226,7 +226,7 @@ schema ClassImplementList extends ClassImplementListDO { impl ClassImplementList { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassImplementList { + pub fn __all__(db: JavaDB) -> *ClassImplementList { for (tmp in ClassImplementListDO(db)) { yield ClassImplementList { element_hash_id : tmp.element_hash_id, @@ -255,7 +255,7 @@ schema Constructor extends ConstructorDO { impl Constructor { @data_constraint @inline - fn __all__(db: JavaDB) -> *Constructor { + pub fn __all__(db: JavaDB) -> *Constructor { for (tmp in ConstructorDO(db)) { yield Constructor { element_hash_id : tmp.element_hash_id, @@ -409,7 +409,7 @@ schema ClassHierarchy extends ClassHierarchyDO { impl ClassHierarchy { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassHierarchy { + pub fn __all__(db: JavaDB) -> *ClassHierarchy { for (tmp in ClassHierarchyDO(db)) { yield ClassHierarchy { child_hash_id : tmp.child_hash_id, @@ -449,7 +449,7 @@ schema Field extends FieldDO { impl Field { @data_constraint @inline - fn __all__(db: JavaDB) -> *Field { + pub fn __all__(db: JavaDB) -> *Field { for (tmp in FieldDO(db)) { yield Field { element_hash_id : tmp.element_hash_id, @@ -596,7 +596,7 @@ schema Interface extends InterfaceDO { impl Interface { @data_constraint @inline - fn __all__(db: JavaDB) -> *Interface { + pub fn __all__(db: JavaDB) -> *Interface { for (tmp in InterfaceDO(db)) { yield Interface { element_hash_id : tmp.element_hash_id, @@ -728,7 +728,7 @@ schema ClassOrInterface { impl ClassOrInterface { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassOrInterface { + pub fn __all__(db: JavaDB) -> *ClassOrInterface { for (c in Class(db)) { yield ClassOrInterface {id : c.element_hash_id} } @@ -1068,7 +1068,7 @@ schema ReferenceRelation extends ReferenceRelationDO { impl ReferenceRelation { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceRelation { + pub fn __all__(db: JavaDB) -> *ReferenceRelation { for (tmp in ReferenceRelationDO(db)) { yield ReferenceRelation { reference_element_hash_id : tmp.reference_element_hash_id, @@ -1130,7 +1130,7 @@ schema LocalVariable extends LocalVariableDO { impl LocalVariable { @data_constraint @inline - fn __all__(db: JavaDB) -> *LocalVariable { + pub fn __all__(db: JavaDB) -> *LocalVariable { for (tmp in LocalVariableDO(db)) { yield LocalVariable { element_hash_id : tmp.element_hash_id, @@ -1254,7 +1254,7 @@ schema AnonymousClass extends AnonymousClassDO { impl AnonymousClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnonymousClass { + pub fn __all__(db: JavaDB) -> *AnonymousClass { for (tmp in AnonymousClassDO(db)) { yield AnonymousClass { element_hash_id : tmp.element_hash_id, @@ -1339,7 +1339,7 @@ schema EnumConstant extends EnumConstantDO { impl EnumConstant { @data_constraint @inline - fn __all__(db: JavaDB) -> *EnumConstant { + pub fn __all__(db: JavaDB) -> *EnumConstant { for (tmp in EnumConstantDO(db)) { yield EnumConstant { element_hash_id : tmp.element_hash_id, @@ -1480,7 +1480,7 @@ schema ClassInitializer extends ClassInitializerDO { impl ClassInitializer { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassInitializer { + pub fn __all__(db: JavaDB) -> *ClassInitializer { for (tmp in ClassInitializerDO(db)) { yield ClassInitializer { element_hash_id : tmp.element_hash_id, @@ -1533,7 +1533,7 @@ schema AbstractClass extends Class { impl AbstractClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *AbstractClass { + pub fn __all__(db: JavaDB) -> *AbstractClass { for (tmp in Class(db)) { for (m in Modifier(db)) { for (auto_tmp1 in tmp.getModifier()) { @@ -1562,7 +1562,7 @@ schema EnumClass extends Class { impl EnumClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *EnumClass { + pub fn __all__(db: JavaDB) -> *EnumClass { for (tmp in Class(db)) { for (m in Modifier(db)) { if (tmp.key_eq(m.getParent())) { @@ -1589,7 +1589,7 @@ schema NestedClass extends Class { impl NestedClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *NestedClass { + pub fn __all__(db: JavaDB) -> *NestedClass { for (tmp in Class(db)) { for (c in Class(db)) { if (c.key_eq(tmp.getParent())) { @@ -1614,7 +1614,7 @@ schema StaticNestedClass extends NestedClass { impl StaticNestedClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *StaticNestedClass { + pub fn __all__(db: JavaDB) -> *StaticNestedClass { for (tmp in NestedClass(db)) { for (m in Modifier(db)) { for (auto_tmp2 in tmp.getModifier()) { @@ -1643,7 +1643,7 @@ schema InnerClass extends NestedClass { impl InnerClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *InnerClass { + pub fn __all__(db: JavaDB) -> *InnerClass { for (tmp in NestedClass(db)) { for (c in NestedClass(db)) { if (tmp = c) { @@ -1670,7 +1670,7 @@ schema NpClass extends NpClassDO { impl NpClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpClass { + pub fn __all__(db: JavaDB) -> *NpClass { for (tmp in NpClassDO(db)) { for (c in NpClassDO(db)) { if (tmp = c) { @@ -1705,7 +1705,7 @@ schema NpInterface extends NpInterfaceDO { impl NpInterface { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpInterface { + pub fn __all__(db: JavaDB) -> *NpInterface { for (tmp in NpInterfaceDO(db)) { for (i in NpInterfaceDO(db)) { if (tmp = i) { diff --git a/language/java/lib/CodeMetric.gdl b/language/java/lib/CodeMetric.gdl index c4dc517d..a2b8f848 100644 --- a/language/java/lib/CodeMetric.gdl +++ b/language/java/lib/CodeMetric.gdl @@ -7,7 +7,7 @@ schema MetricCallable extends Callable { impl MetricCallable { @data_constraint @inline - fn __all__(db: JavaDB) -> *MetricCallable { + pub fn __all__(db: JavaDB) -> *MetricCallable { for (tmp in Callable(db)) { yield MetricCallable { id : tmp.id diff --git a/language/java/lib/Container.gdl b/language/java/lib/Container.gdl index ef384d87..e76f1077 100644 --- a/language/java/lib/Container.gdl +++ b/language/java/lib/Container.gdl @@ -7,7 +7,7 @@ schema Program extends ProgramDO { impl Program { @data_constraint @inline - fn __all__(db: JavaDB) -> *Program { + pub fn __all__(db: JavaDB) -> *Program { for (tmp in ProgramDO(db)) { yield Program { program_hash_id : tmp.program_hash_id, @@ -25,7 +25,7 @@ schema File extends FileDO { impl File { @data_constraint @inline - fn __all__(db: JavaDB) -> *File { + pub fn __all__(db: JavaDB) -> *File { for (tmp in FileDO(db)) { yield File { element_hash_id : tmp.element_hash_id, @@ -82,7 +82,7 @@ schema Folder extends FolderDO { impl Folder { @data_constraint @inline - fn __all__(db: JavaDB) -> *Folder { + pub fn __all__(db: JavaDB) -> *Folder { for (tmp in FolderDO(db)) { yield Folder { element_hash_id : tmp.element_hash_id, @@ -137,7 +137,7 @@ schema ContainerParent extends ContainerParentDO { impl ContainerParent { @data_constraint @inline - fn __all__(db: JavaDB) -> *ContainerParent { + pub fn __all__(db: JavaDB) -> *ContainerParent { for (tmp in ContainerParentDO(db)) { yield ContainerParent { child_hash_id : tmp.child_hash_id, @@ -166,7 +166,7 @@ schema Import extends ImportDO { impl Import { @data_constraint @inline - fn __all__(db: JavaDB) -> *Import { + pub fn __all__(db: JavaDB) -> *Import { for (tmp in ImportDO(db)) { yield Import { element_hash_id : tmp.element_hash_id, @@ -258,7 +258,7 @@ schema Package { impl Package { @data_constraint @inline - fn __all__(db: JavaDB) -> *Package { + pub fn __all__(db: JavaDB) -> *Package { for (ps in db.package_statement) { yield Package { id: ps.package_hash_id, @@ -270,7 +270,7 @@ impl Package { * @brief gets the name of the package. * @return string */ - fn getPackageName(self) -> string { + pub fn getPackageName(self) -> string { return self.qualified_name } } @@ -283,7 +283,7 @@ schema Cupackage extends CupackageDO { impl Cupackage { @data_constraint @inline - fn __all__(db: JavaDB) -> *Cupackage { + pub fn __all__(db: JavaDB) -> *Cupackage { for (tmp in CupackageDO(db)) { yield Cupackage { file_hash_id : tmp.file_hash_id, @@ -324,7 +324,7 @@ schema ReferenceParameterList { impl ReferenceParameterList { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceParameterList { + pub fn __all__(db: JavaDB) -> *ReferenceParameterList { for (r in ReferenceParameterListDO(db)) { yield ReferenceParameterList {id : r.list_hash_id} } @@ -430,7 +430,7 @@ schema ImportStaticStatement extends ImportStaticStatementDO { impl ImportStaticStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ImportStaticStatement { + pub fn __all__(db: JavaDB) -> *ImportStaticStatement { for (tmp in ImportStaticStatementDO(db)) { yield ImportStaticStatement { element_hash_id : tmp.element_hash_id, @@ -508,7 +508,7 @@ schema ImportStaticReferenceElement extends ImportStaticReferenceElementDO { impl ImportStaticReferenceElement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ImportStaticReferenceElement { + pub fn __all__(db: JavaDB) -> *ImportStaticReferenceElement { for (tmp in ImportStaticReferenceElementDO(db)) { yield ImportStaticReferenceElement { element_hash_id : tmp.element_hash_id, @@ -561,7 +561,7 @@ schema ResourceList extends ResourceListDO { impl ResourceList { @data_constraint @inline - fn __all__(db: JavaDB) -> *ResourceList { + pub fn __all__(db: JavaDB) -> *ResourceList { for (tmp in ResourceListDO(db)) { yield ResourceList { element_hash_id : tmp.element_hash_id, @@ -638,7 +638,7 @@ schema NpProject extends NpProjectDO { impl NpProject { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpProject { + pub fn __all__(db: JavaDB) -> *NpProject { for (tmp in NpProjectDO(db)) { for (np in NpProjectDO(db)) { if (tmp = np) { @@ -661,7 +661,7 @@ schema NpFile extends NpFileDO { impl NpFile { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpFile { + pub fn __all__(db: JavaDB) -> *NpFile { for (tmp in NpFileDO(db)) { for (nf in NpFileDO(db)) { if (tmp = nf) { diff --git a/language/java/lib/DOClass.gdl b/language/java/lib/DOClass.gdl index 2507a907..17a29471 100644 --- a/language/java/lib/DOClass.gdl +++ b/language/java/lib/DOClass.gdl @@ -8,7 +8,7 @@ schema AnnotatedRelationDO { impl AnnotatedRelationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotatedRelationDO { + pub fn __all__(db: JavaDB) -> *AnnotatedRelationDO { for (tmp in db.annotated_relation) { yield AnnotatedRelationDO { annotation_hash_id : tmp.annotation_hash_id, @@ -39,7 +39,7 @@ schema AnnotationAccessArgumentWithNameDO { impl AnnotationAccessArgumentWithNameDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationAccessArgumentWithNameDO { + pub fn __all__(db: JavaDB) -> *AnnotationAccessArgumentWithNameDO { for (tmp in db.annotation_access_argument_with_name) { yield AnnotationAccessArgumentWithNameDO { element_hash_id : tmp.element_hash_id, @@ -109,7 +109,7 @@ schema AnnotationAccessArgumentWithoutNameDO { impl AnnotationAccessArgumentWithoutNameDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationAccessArgumentWithoutNameDO { + pub fn __all__(db: JavaDB) -> *AnnotationAccessArgumentWithoutNameDO { for (tmp in db.annotation_access_argument_without_name) { yield AnnotationAccessArgumentWithoutNameDO { element_hash_id : tmp.element_hash_id, @@ -169,7 +169,7 @@ schema AnnotationArrayInitializerDO { impl AnnotationArrayInitializerDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationArrayInitializerDO { + pub fn __all__(db: JavaDB) -> *AnnotationArrayInitializerDO { for (tmp in db.annotation_array_initializer) { yield AnnotationArrayInitializerDO { element_hash_id : tmp.element_hash_id, @@ -214,7 +214,7 @@ schema AnnotationCanNotResolvedDO { impl AnnotationCanNotResolvedDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationCanNotResolvedDO { + pub fn __all__(db: JavaDB) -> *AnnotationCanNotResolvedDO { for (tmp in db.annotation_can_not_resolved) { yield AnnotationCanNotResolvedDO { element_hash_id : tmp.element_hash_id, @@ -268,7 +268,7 @@ schema AnnotationCanResolvedDO { impl AnnotationCanResolvedDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationCanResolvedDO { + pub fn __all__(db: JavaDB) -> *AnnotationCanResolvedDO { for (tmp in db.annotation_can_resolved) { yield AnnotationCanResolvedDO { element_hash_id : tmp.element_hash_id, @@ -326,7 +326,7 @@ schema AnnotationDeclarationDO { impl AnnotationDeclarationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDeclarationDO { + pub fn __all__(db: JavaDB) -> *AnnotationDeclarationDO { for (tmp in db.annotation_declaration) { yield AnnotationDeclarationDO { element_hash_id : tmp.element_hash_id, @@ -356,7 +356,7 @@ schema AnnotationDeclarationParameterDO { impl AnnotationDeclarationParameterDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDeclarationParameterDO { + pub fn __all__(db: JavaDB) -> *AnnotationDeclarationParameterDO { for (tmp in db.annotation_declaration_parameter) { yield AnnotationDeclarationParameterDO { element_hash_id : tmp.element_hash_id, @@ -414,7 +414,7 @@ schema AnnotationDeclarationParameterDefaultValueDO { impl AnnotationDeclarationParameterDefaultValueDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnnotationDeclarationParameterDefaultValueDO { + pub fn __all__(db: JavaDB) -> *AnnotationDeclarationParameterDefaultValueDO { for (tmp in db.annotation_declaration_parameter_default_value) { yield AnnotationDeclarationParameterDefaultValueDO { element_hash_id : tmp.element_hash_id, @@ -443,7 +443,7 @@ schema AnonymousClassDO { impl AnonymousClassDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AnonymousClassDO { + pub fn __all__(db: JavaDB) -> *AnonymousClassDO { for (tmp in db.anonymous_class) { yield AnonymousClassDO { element_hash_id : tmp.element_hash_id, @@ -493,7 +493,7 @@ schema ArrayDO { impl ArrayDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayDO { + pub fn __all__(db: JavaDB) -> *ArrayDO { for (tmp in db.array) { yield ArrayDO { element_hash_id : tmp.element_hash_id, @@ -520,7 +520,7 @@ schema ArrayAccessExpressionDO { impl ArrayAccessExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayAccessExpressionDO { + pub fn __all__(db: JavaDB) -> *ArrayAccessExpressionDO { for (tmp in db.array_access_expression) { yield ArrayAccessExpressionDO { element_hash_id : tmp.element_hash_id, @@ -563,7 +563,7 @@ schema ArrayCreationExpressionDO { impl ArrayCreationExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayCreationExpressionDO { + pub fn __all__(db: JavaDB) -> *ArrayCreationExpressionDO { for (tmp in db.array_creation_expression) { yield ArrayCreationExpressionDO { element_hash_id : tmp.element_hash_id, @@ -597,7 +597,7 @@ schema ArrayInitializerExpressionDO { impl ArrayInitializerExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayInitializerExpressionDO { + pub fn __all__(db: JavaDB) -> *ArrayInitializerExpressionDO { for (tmp in db.array_initializer_expression) { yield ArrayInitializerExpressionDO { element_hash_id : tmp.element_hash_id, @@ -624,7 +624,7 @@ schema AssertStatementDO { impl AssertStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AssertStatementDO { + pub fn __all__(db: JavaDB) -> *AssertStatementDO { for (tmp in db.assert_statement) { yield AssertStatementDO { element_hash_id : tmp.element_hash_id, @@ -660,7 +660,7 @@ schema AssignmentExpressionDO { impl AssignmentExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *AssignmentExpressionDO { + pub fn __all__(db: JavaDB) -> *AssignmentExpressionDO { for (tmp in db.assignment_expression) { yield AssignmentExpressionDO { element_hash_id : tmp.element_hash_id, @@ -704,7 +704,7 @@ schema BinaryExpressionDO { impl BinaryExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *BinaryExpressionDO { + pub fn __all__(db: JavaDB) -> *BinaryExpressionDO { for (tmp in db.binary_expression) { yield BinaryExpressionDO { element_hash_id : tmp.element_hash_id, @@ -746,7 +746,7 @@ schema BlockStatementDO { impl BlockStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *BlockStatementDO { + pub fn __all__(db: JavaDB) -> *BlockStatementDO { for (tmp in db.block_statement) { yield BlockStatementDO { element_hash_id : tmp.element_hash_id, @@ -772,7 +772,7 @@ schema BooleanLiteralDO { impl BooleanLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *BooleanLiteralDO { + pub fn __all__(db: JavaDB) -> *BooleanLiteralDO { for (tmp in db.boolean_literal) { yield BooleanLiteralDO { element_hash_id : tmp.element_hash_id, @@ -798,7 +798,7 @@ schema BreakStatementDO { impl BreakStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *BreakStatementDO { + pub fn __all__(db: JavaDB) -> *BreakStatementDO { for (tmp in db.break_statement) { yield BreakStatementDO { element_hash_id : tmp.element_hash_id, @@ -824,7 +824,7 @@ schema CallableBindingDO { impl CallableBindingDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallableBindingDO { + pub fn __all__(db: JavaDB) -> *CallableBindingDO { for (tmp in db.callable_binding) { yield CallableBindingDO { caller_hash_id : tmp.caller_hash_id, @@ -850,7 +850,7 @@ schema CallableEnclosingExpressionDO { impl CallableEnclosingExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallableEnclosingExpressionDO { + pub fn __all__(db: JavaDB) -> *CallableEnclosingExpressionDO { for (tmp in db.callable_enclosing_expression) { yield CallableEnclosingExpressionDO { expression_hash_id : tmp.expression_hash_id, @@ -876,7 +876,7 @@ schema CallableEnclosingStatementDO { impl CallableEnclosingStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallableEnclosingStatementDO { + pub fn __all__(db: JavaDB) -> *CallableEnclosingStatementDO { for (tmp in db.callable_enclosing_statement) { yield CallableEnclosingStatementDO { statement_hash_id : tmp.statement_hash_id, @@ -907,7 +907,7 @@ schema CatchSectionDO { impl CatchSectionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CatchSectionDO { + pub fn __all__(db: JavaDB) -> *CatchSectionDO { for (tmp in db.catch_section) { yield CatchSectionDO { element_hash_id : tmp.element_hash_id, @@ -973,7 +973,7 @@ schema CharacterLiteralDO { impl CharacterLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CharacterLiteralDO { + pub fn __all__(db: JavaDB) -> *CharacterLiteralDO { for (tmp in db.character_literal) { yield CharacterLiteralDO { element_hash_id : tmp.element_hash_id, @@ -1002,7 +1002,7 @@ schema ClassDO { impl ClassDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassDO { + pub fn __all__(db: JavaDB) -> *ClassDO { for (tmp in db.class) { yield ClassDO { element_hash_id : tmp.element_hash_id, @@ -1052,7 +1052,7 @@ schema ClassHierarchyDO { impl ClassHierarchyDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassHierarchyDO { + pub fn __all__(db: JavaDB) -> *ClassHierarchyDO { for (tmp in db.class_hierarchy) { yield ClassHierarchyDO { child_hash_id : tmp.child_hash_id, @@ -1078,7 +1078,7 @@ schema ClassImplementListDO { impl ClassImplementListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassImplementListDO { + pub fn __all__(db: JavaDB) -> *ClassImplementListDO { for (tmp in db.class_implement_list) { yield ClassImplementListDO { element_hash_id : tmp.element_hash_id, @@ -1106,7 +1106,7 @@ schema ClassInitializerDO { impl ClassInitializerDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ClassInitializerDO { + pub fn __all__(db: JavaDB) -> *ClassInitializerDO { for (tmp in db.class_initializer) { yield ClassInitializerDO { element_hash_id : tmp.element_hash_id, @@ -1152,7 +1152,7 @@ schema CodeBlockDO { impl CodeBlockDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CodeBlockDO { + pub fn __all__(db: JavaDB) -> *CodeBlockDO { for (tmp in db.code_block) { yield CodeBlockDO { element_hash_id : tmp.element_hash_id, @@ -1213,7 +1213,7 @@ schema CommentDO { impl CommentDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CommentDO { + pub fn __all__(db: JavaDB) -> *CommentDO { for (tmp in db.comment) { yield CommentDO { element_hash_id : tmp.element_hash_id, @@ -1265,7 +1265,7 @@ schema ConditionalExpressionDO { impl ConditionalExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConditionalExpressionDO { + pub fn __all__(db: JavaDB) -> *ConditionalExpressionDO { for (tmp in db.conditional_expression) { yield ConditionalExpressionDO { element_hash_id : tmp.element_hash_id, @@ -1311,7 +1311,7 @@ schema ConstructorDO { impl ConstructorDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConstructorDO { + pub fn __all__(db: JavaDB) -> *ConstructorDO { for (tmp in db.constructor) { yield ConstructorDO { element_hash_id : tmp.element_hash_id, @@ -1365,7 +1365,7 @@ schema ConstructorInvocationDO { impl ConstructorInvocationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConstructorInvocationDO { + pub fn __all__(db: JavaDB) -> *ConstructorInvocationDO { for (tmp in db.constructor_invocation) { yield ConstructorInvocationDO { element_hash_id : tmp.element_hash_id, @@ -1391,7 +1391,7 @@ schema ContainerParentDO { impl ContainerParentDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ContainerParentDO { + pub fn __all__(db: JavaDB) -> *ContainerParentDO { for (tmp in db.container_parent) { yield ContainerParentDO { child_hash_id : tmp.child_hash_id, @@ -1417,7 +1417,7 @@ schema ContinueStatementDO { impl ContinueStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ContinueStatementDO { + pub fn __all__(db: JavaDB) -> *ContinueStatementDO { for (tmp in db.continue_statement) { yield ContinueStatementDO { element_hash_id : tmp.element_hash_id, @@ -1443,7 +1443,7 @@ schema CupackageDO { impl CupackageDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *CupackageDO { + pub fn __all__(db: JavaDB) -> *CupackageDO { for (tmp in db.cupackage) { yield CupackageDO { file_hash_id : tmp.file_hash_id, @@ -1470,7 +1470,7 @@ schema DeclarationElementDO { impl DeclarationElementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *DeclarationElementDO { + pub fn __all__(db: JavaDB) -> *DeclarationElementDO { for (tmp in db.declaration_element) { yield DeclarationElementDO { element_hash_id : tmp.element_hash_id, @@ -1506,7 +1506,7 @@ schema DoWhileStatementDO { impl DoWhileStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *DoWhileStatementDO { + pub fn __all__(db: JavaDB) -> *DoWhileStatementDO { for (tmp in db.do_while_statement) { yield DoWhileStatementDO { element_hash_id : tmp.element_hash_id, @@ -1548,7 +1548,7 @@ schema DoubleLiteralDO { impl DoubleLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *DoubleLiteralDO { + pub fn __all__(db: JavaDB) -> *DoubleLiteralDO { for (tmp in db.double_literal) { yield DoubleLiteralDO { element_hash_id : tmp.element_hash_id, @@ -1576,7 +1576,7 @@ schema ElementDO { impl ElementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ElementDO { + pub fn __all__(db: JavaDB) -> *ElementDO { for (tmp in db.element) { yield ElementDO { element_hash_id : tmp.element_hash_id, @@ -1620,7 +1620,7 @@ schema EmptyReferenceParameterListDO { impl EmptyReferenceParameterListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *EmptyReferenceParameterListDO { + pub fn __all__(db: JavaDB) -> *EmptyReferenceParameterListDO { for (tmp in db.empty_reference_parameter_list) { yield EmptyReferenceParameterListDO { list_hash_id : tmp.list_hash_id, @@ -1661,7 +1661,7 @@ schema EmptyStatementDO { impl EmptyStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *EmptyStatementDO { + pub fn __all__(db: JavaDB) -> *EmptyStatementDO { for (tmp in db.empty_statement) { yield EmptyStatementDO { element_hash_id : tmp.element_hash_id @@ -1682,7 +1682,7 @@ schema EnumConstantDO { impl EnumConstantDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *EnumConstantDO { + pub fn __all__(db: JavaDB) -> *EnumConstantDO { for (tmp in db.enum_constant) { yield EnumConstantDO { element_hash_id : tmp.element_hash_id, @@ -1734,7 +1734,7 @@ schema ExceptionDO { impl ExceptionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExceptionDO { + pub fn __all__(db: JavaDB) -> *ExceptionDO { for (tmp in db.exception) { yield ExceptionDO { element_hash_id : tmp.element_hash_id, @@ -1780,7 +1780,7 @@ schema ExpressionDO { impl ExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionDO { + pub fn __all__(db: JavaDB) -> *ExpressionDO { for (tmp in db.expression) { yield ExpressionDO { element_hash_id : tmp.element_hash_id, @@ -1841,7 +1841,7 @@ schema ExpressionListDO { impl ExpressionListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionListDO { + pub fn __all__(db: JavaDB) -> *ExpressionListDO { for (tmp in db.expression_list) { yield ExpressionListDO { element_hash_id : tmp.element_hash_id, @@ -1888,7 +1888,7 @@ schema ExpressionListExpressionRelationDO { impl ExpressionListExpressionRelationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionListExpressionRelationDO { + pub fn __all__(db: JavaDB) -> *ExpressionListExpressionRelationDO { for (tmp in db.expression_list_expression_relation) { yield ExpressionListExpressionRelationDO { expression_list_hash_id : tmp.expression_list_hash_id, @@ -1925,7 +1925,7 @@ schema ExpressionStatementDO { impl ExpressionStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionStatementDO { + pub fn __all__(db: JavaDB) -> *ExpressionStatementDO { for (tmp in db.expression_statement) { yield ExpressionStatementDO { element_hash_id : tmp.element_hash_id, @@ -1954,7 +1954,7 @@ schema FieldDO { impl FieldDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *FieldDO { + pub fn __all__(db: JavaDB) -> *FieldDO { for (tmp in db.field) { yield FieldDO { element_hash_id : tmp.element_hash_id, @@ -2007,7 +2007,7 @@ schema FileDO { impl FileDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *FileDO { + pub fn __all__(db: JavaDB) -> *FileDO { for (tmp in db.file) { yield FileDO { element_hash_id : tmp.element_hash_id, @@ -2057,7 +2057,7 @@ schema FileMd5SumDO { impl FileMd5SumDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *FileMd5SumDO { + pub fn __all__(db: JavaDB) -> *FileMd5SumDO { for (tmp in db.file_md5_sum) { yield FileMd5SumDO { file_hash_id : tmp.file_hash_id, @@ -2083,7 +2083,7 @@ schema FileSha256SumDO { impl FileSha256SumDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *FileSha256SumDO { + pub fn __all__(db: JavaDB) -> *FileSha256SumDO { for (tmp in db.file_sha256_sum) { yield FileSha256SumDO { file_hash_id : tmp.file_hash_id, @@ -2109,7 +2109,7 @@ schema FloatingPointLiteralDO { impl FloatingPointLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *FloatingPointLiteralDO { + pub fn __all__(db: JavaDB) -> *FloatingPointLiteralDO { for (tmp in db.floating_point_literal) { yield FloatingPointLiteralDO { element_hash_id : tmp.element_hash_id, @@ -2137,7 +2137,7 @@ schema FolderDO { impl FolderDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *FolderDO { + pub fn __all__(db: JavaDB) -> *FolderDO { for (tmp in db.folder) { yield FolderDO { element_hash_id : tmp.element_hash_id, @@ -2182,7 +2182,7 @@ schema ForStatementDO { impl ForStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ForStatementDO { + pub fn __all__(db: JavaDB) -> *ForStatementDO { for (tmp in db.for_statement) { yield ForStatementDO { element_hash_id : tmp.element_hash_id, @@ -2234,7 +2234,7 @@ schema ForeachStatementDO { impl ForeachStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ForeachStatementDO { + pub fn __all__(db: JavaDB) -> *ForeachStatementDO { for (tmp in db.foreach_statement) { yield ForeachStatementDO { element_hash_id : tmp.element_hash_id, @@ -2278,7 +2278,7 @@ schema IdentifierDO { impl IdentifierDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *IdentifierDO { + pub fn __all__(db: JavaDB) -> *IdentifierDO { for (tmp in db.identifier) { yield IdentifierDO { element_hash_id : tmp.element_hash_id, @@ -2322,7 +2322,7 @@ schema IfStatementWithElseDO { impl IfStatementWithElseDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *IfStatementWithElseDO { + pub fn __all__(db: JavaDB) -> *IfStatementWithElseDO { for (tmp in db.if_statement_with_else) { yield IfStatementWithElseDO { element_hash_id : tmp.element_hash_id, @@ -2365,7 +2365,7 @@ schema IfStatementWithoutElseDO { impl IfStatementWithoutElseDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *IfStatementWithoutElseDO { + pub fn __all__(db: JavaDB) -> *IfStatementWithoutElseDO { for (tmp in db.if_statement_without_else) { yield IfStatementWithoutElseDO { element_hash_id : tmp.element_hash_id, @@ -2403,7 +2403,7 @@ schema ImportDO { impl ImportDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ImportDO { + pub fn __all__(db: JavaDB) -> *ImportDO { for (tmp in db.import) { yield ImportDO { element_hash_id : tmp.element_hash_id, @@ -2463,7 +2463,7 @@ schema ImportStaticReferenceElementDO { impl ImportStaticReferenceElementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ImportStaticReferenceElementDO { + pub fn __all__(db: JavaDB) -> *ImportStaticReferenceElementDO { for (tmp in db.import_static_reference_element) { yield ImportStaticReferenceElementDO { element_hash_id : tmp.element_hash_id, @@ -2508,7 +2508,7 @@ schema ImportStaticStatementDO { impl ImportStaticStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ImportStaticStatementDO { + pub fn __all__(db: JavaDB) -> *ImportStaticStatementDO { for (tmp in db.import_static_statement) { yield ImportStaticStatementDO { element_hash_id : tmp.element_hash_id, @@ -2560,7 +2560,7 @@ schema InstanceofExpressionDO { impl InstanceofExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *InstanceofExpressionDO { + pub fn __all__(db: JavaDB) -> *InstanceofExpressionDO { for (tmp in db.instanceof_expression) { yield InstanceofExpressionDO { element_hash_id : tmp.element_hash_id, @@ -2602,7 +2602,7 @@ schema IntegerLiteralDO { impl IntegerLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *IntegerLiteralDO { + pub fn __all__(db: JavaDB) -> *IntegerLiteralDO { for (tmp in db.integer_literal) { yield IntegerLiteralDO { element_hash_id : tmp.element_hash_id, @@ -2631,7 +2631,7 @@ schema InterfaceDO { impl InterfaceDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *InterfaceDO { + pub fn __all__(db: JavaDB) -> *InterfaceDO { for (tmp in db.interface) { yield InterfaceDO { element_hash_id : tmp.element_hash_id, @@ -2684,7 +2684,7 @@ schema JavadocCommentDO { impl JavadocCommentDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocCommentDO { + pub fn __all__(db: JavaDB) -> *JavadocCommentDO { for (tmp in db.javadoc_comment) { yield JavadocCommentDO { element_hash_id : tmp.element_hash_id, @@ -2738,7 +2738,7 @@ schema JavadocTagDO { impl JavadocTagDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocTagDO { + pub fn __all__(db: JavaDB) -> *JavadocTagDO { for (tmp in db.javadoc_tag) { yield JavadocTagDO { element_hash_id : tmp.element_hash_id, @@ -2798,7 +2798,7 @@ schema JavadocTagValueDO { impl JavadocTagValueDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocTagValueDO { + pub fn __all__(db: JavaDB) -> *JavadocTagValueDO { for (tmp in db.javadoc_tag_value) { yield JavadocTagValueDO { element_hash_id : tmp.element_hash_id, @@ -2843,7 +2843,7 @@ schema JavadocDataTokenDO { impl JavadocDataTokenDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocDataTokenDO { + pub fn __all__(db: JavaDB) -> *JavadocDataTokenDO { for (tmp in db.javadoc_data_token) { yield JavadocDataTokenDO { element_hash_id : tmp.element_hash_id, @@ -2894,7 +2894,7 @@ schema LabeledStatementDO { impl LabeledStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *LabeledStatementDO { + pub fn __all__(db: JavaDB) -> *LabeledStatementDO { for (tmp in db.labeled_statement) { yield LabeledStatementDO { element_hash_id : tmp.element_hash_id, @@ -2931,7 +2931,7 @@ schema LambdaExpressionDO { impl LambdaExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *LambdaExpressionDO { + pub fn __all__(db: JavaDB) -> *LambdaExpressionDO { for (tmp in db.lambda_expression) { yield LambdaExpressionDO { element_hash_id : tmp.element_hash_id, @@ -2984,7 +2984,7 @@ schema LocalClassDO { impl LocalClassDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *LocalClassDO { + pub fn __all__(db: JavaDB) -> *LocalClassDO { for (tmp in db.local_class) { yield LocalClassDO { element_hash_id : tmp.element_hash_id, @@ -3038,7 +3038,7 @@ schema LocalVariableDO { impl LocalVariableDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *LocalVariableDO { + pub fn __all__(db: JavaDB) -> *LocalVariableDO { for (tmp in db.local_variable) { yield LocalVariableDO { element_hash_id : tmp.element_hash_id, @@ -3100,7 +3100,7 @@ schema LocationDO { impl LocationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *LocationDO { + pub fn __all__(db: JavaDB) -> *LocationDO { for (tmp in db.location) { yield LocationDO { element_hash_id : tmp.element_hash_id, @@ -3158,7 +3158,7 @@ schema LongLiteralDO { impl LongLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *LongLiteralDO { + pub fn __all__(db: JavaDB) -> *LongLiteralDO { for (tmp in db.long_literal) { yield LongLiteralDO { element_hash_id : tmp.element_hash_id, @@ -3186,7 +3186,7 @@ schema MetainfoDO { impl MetainfoDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *MetainfoDO { + pub fn __all__(db: JavaDB) -> *MetainfoDO { for (tmp in db.metainfo) { yield MetainfoDO { oid : tmp.oid, @@ -3233,7 +3233,7 @@ schema MethodDO { impl MethodDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodDO { + pub fn __all__(db: JavaDB) -> *MethodDO { for (tmp in db.method) { yield MethodDO { element_hash_id : tmp.element_hash_id, @@ -3297,7 +3297,7 @@ schema MethodAccessExpressionWithTypeDO { impl MethodAccessExpressionWithTypeDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodAccessExpressionWithTypeDO { + pub fn __all__(db: JavaDB) -> *MethodAccessExpressionWithTypeDO { for (tmp in db.method_access_expression_with_type) { yield MethodAccessExpressionWithTypeDO { element_hash_id : tmp.element_hash_id, @@ -3340,7 +3340,7 @@ schema MethodAccessExpressionWithoutTypeDO { impl MethodAccessExpressionWithoutTypeDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodAccessExpressionWithoutTypeDO { + pub fn __all__(db: JavaDB) -> *MethodAccessExpressionWithoutTypeDO { for (tmp in db.method_access_expression_without_type) { yield MethodAccessExpressionWithoutTypeDO { element_hash_id : tmp.element_hash_id, @@ -3374,7 +3374,7 @@ schema MethodReferenceExpressionDO { impl MethodReferenceExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodReferenceExpressionDO { + pub fn __all__(db: JavaDB) -> *MethodReferenceExpressionDO { for (tmp in db.method_reference_expression) { yield MethodReferenceExpressionDO { element_hash_id : tmp.element_hash_id, @@ -3402,7 +3402,7 @@ schema ModifierDO { impl ModifierDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ModifierDO { + pub fn __all__(db: JavaDB) -> *ModifierDO { for (tmp in db.modifier) { yield ModifierDO { element_hash_id : tmp.element_hash_id, @@ -3445,7 +3445,7 @@ schema ModifierListDO { impl ModifierListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ModifierListDO { + pub fn __all__(db: JavaDB) -> *ModifierListDO { for (tmp in db.modifier_list) { yield ModifierListDO { element_hash_id : tmp.element_hash_id, @@ -3479,7 +3479,7 @@ schema ModuleDO { impl ModuleDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ModuleDO { + pub fn __all__(db: JavaDB) -> *ModuleDO { for (tmp in db.module) { yield ModuleDO { element_hash_id : tmp.element_hash_id, @@ -3506,7 +3506,7 @@ schema NameStringDO { impl NameStringDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NameStringDO { + pub fn __all__(db: JavaDB) -> *NameStringDO { for (tmp in db.name_string) { yield NameStringDO { parent_hash_id : tmp.parent_hash_id, @@ -3541,7 +3541,7 @@ schema NewExpressionDO { impl NewExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NewExpressionDO { + pub fn __all__(db: JavaDB) -> *NewExpressionDO { for (tmp in db.new_expression) { yield NewExpressionDO { element_hash_id : tmp.element_hash_id, @@ -3575,7 +3575,7 @@ schema NullLiteralDO { impl NullLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NullLiteralDO { + pub fn __all__(db: JavaDB) -> *NullLiteralDO { for (tmp in db.null_literal) { yield NullLiteralDO { element_hash_id : tmp.element_hash_id, @@ -3603,7 +3603,7 @@ schema NumberOfLinesDO { impl NumberOfLinesDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NumberOfLinesDO { + pub fn __all__(db: JavaDB) -> *NumberOfLinesDO { for (tmp in db.number_of_lines) { yield NumberOfLinesDO { element_hash_id : tmp.element_hash_id, @@ -3648,7 +3648,7 @@ schema PackageStatementDO { impl PackageStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *PackageStatementDO { + pub fn __all__(db: JavaDB) -> *PackageStatementDO { for (tmp in db.package_statement) { yield PackageStatementDO { element_hash_id : tmp.element_hash_id, @@ -3703,7 +3703,7 @@ schema ParameterDO { impl ParameterDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ParameterDO { + pub fn __all__(db: JavaDB) -> *ParameterDO { for (tmp in db.parameter) { yield ParameterDO { element_hash_id : tmp.element_hash_id, @@ -3769,7 +3769,7 @@ schema ParentDO { impl ParentDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ParentDO { + pub fn __all__(db: JavaDB) -> *ParentDO { for (tmp in db.parent) { yield ParentDO { parent_hash_id : tmp.parent_hash_id, @@ -3796,7 +3796,7 @@ schema PolyadicExpressionDO { impl PolyadicExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *PolyadicExpressionDO { + pub fn __all__(db: JavaDB) -> *PolyadicExpressionDO { for (tmp in db.polyadic_expression) { yield PolyadicExpressionDO { element_hash_id : tmp.element_hash_id, @@ -3830,7 +3830,7 @@ schema PrimitiveDO { impl PrimitiveDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *PrimitiveDO { + pub fn __all__(db: JavaDB) -> *PrimitiveDO { for (tmp in db.primitive) { yield PrimitiveDO { oid : tmp.oid, @@ -3856,7 +3856,7 @@ schema ProgramDO { impl ProgramDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ProgramDO { + pub fn __all__(db: JavaDB) -> *ProgramDO { for (tmp in db.program) { yield ProgramDO { program_hash_id : tmp.program_hash_id, @@ -3884,7 +3884,7 @@ schema ReferenceElementDO { impl ReferenceElementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceElementDO { + pub fn __all__(db: JavaDB) -> *ReferenceElementDO { for (tmp in db.reference_element) { yield ReferenceElementDO { element_hash_id : tmp.element_hash_id, @@ -3925,7 +3925,7 @@ schema ReferenceExpressionDO { impl ReferenceExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceExpressionDO { + pub fn __all__(db: JavaDB) -> *ReferenceExpressionDO { for (tmp in db.reference_expression) { yield ReferenceExpressionDO { element_hash_id : tmp.element_hash_id @@ -3946,7 +3946,7 @@ schema ReferenceListDO { impl ReferenceListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceListDO { + pub fn __all__(db: JavaDB) -> *ReferenceListDO { for (tmp in db.reference_list) { yield ReferenceListDO { element_hash_id : tmp.element_hash_id, @@ -4000,7 +4000,7 @@ schema ReferenceParameterListDO { impl ReferenceParameterListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceParameterListDO { + pub fn __all__(db: JavaDB) -> *ReferenceParameterListDO { for (tmp in db.reference_parameter_list) { yield ReferenceParameterListDO { type_element_hash_id : tmp.type_element_hash_id, @@ -4065,7 +4065,7 @@ schema ReferenceRelationDO { impl ReferenceRelationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceRelationDO { + pub fn __all__(db: JavaDB) -> *ReferenceRelationDO { for (tmp in db.reference_relation) { yield ReferenceRelationDO { reference_element_hash_id : tmp.reference_element_hash_id, @@ -4099,7 +4099,7 @@ schema ReferenceTypeDO { impl ReferenceTypeDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceTypeDO { + pub fn __all__(db: JavaDB) -> *ReferenceTypeDO { for (tmp in db.reference_type) { yield ReferenceTypeDO { oid : tmp.oid, @@ -4135,7 +4135,7 @@ schema ResourceListDO { impl ResourceListDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ResourceListDO { + pub fn __all__(db: JavaDB) -> *ResourceListDO { for (tmp in db.resource_list) { yield ResourceListDO { element_hash_id : tmp.element_hash_id, @@ -4177,7 +4177,7 @@ schema ReturnStatementDO { impl ReturnStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReturnStatementDO { + pub fn __all__(db: JavaDB) -> *ReturnStatementDO { for (tmp in db.return_statement) { yield ReturnStatementDO { element_hash_id : tmp.element_hash_id, @@ -4207,7 +4207,7 @@ schema StatementDO { impl StatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *StatementDO { + pub fn __all__(db: JavaDB) -> *StatementDO { for (tmp in db.statement) { yield StatementDO { element_hash_id : tmp.element_hash_id, @@ -4265,7 +4265,7 @@ schema StatementEnclosingExpressionDO { impl StatementEnclosingExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *StatementEnclosingExpressionDO { + pub fn __all__(db: JavaDB) -> *StatementEnclosingExpressionDO { for (tmp in db.statement_enclosing_expression) { yield StatementEnclosingExpressionDO { expression_hash_id : tmp.expression_hash_id, @@ -4291,7 +4291,7 @@ schema StringLiteralDO { impl StringLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *StringLiteralDO { + pub fn __all__(db: JavaDB) -> *StringLiteralDO { for (tmp in db.string_literal) { yield StringLiteralDO { element_hash_id : tmp.element_hash_id, @@ -4316,7 +4316,7 @@ schema SuperAccessExpressionDO { impl SuperAccessExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperAccessExpressionDO { + pub fn __all__(db: JavaDB) -> *SuperAccessExpressionDO { for (tmp in db.super_access_expression) { yield SuperAccessExpressionDO { element_hash_id : tmp.element_hash_id @@ -4333,7 +4333,7 @@ schema SuperConstructorInvocationDO { impl SuperConstructorInvocationDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperConstructorInvocationDO { + pub fn __all__(db: JavaDB) -> *SuperConstructorInvocationDO { for (tmp in db.super_constructor_invocation) { yield SuperConstructorInvocationDO { element_hash_id : tmp.element_hash_id @@ -4350,7 +4350,7 @@ schema SuperExpressionDO { impl SuperExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperExpressionDO { + pub fn __all__(db: JavaDB) -> *SuperExpressionDO { for (tmp in db.super_expression) { yield SuperExpressionDO { element_hash_id : tmp.element_hash_id @@ -4368,7 +4368,7 @@ schema SuperExpressionWithQualifierDO { impl SuperExpressionWithQualifierDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperExpressionWithQualifierDO { + pub fn __all__(db: JavaDB) -> *SuperExpressionWithQualifierDO { for (tmp in db.super_expression_with_qualifier) { yield SuperExpressionWithQualifierDO { element_hash_id : tmp.element_hash_id, @@ -4396,7 +4396,7 @@ schema SwitchLabelStatementDO { impl SwitchLabelStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SwitchLabelStatementDO { + pub fn __all__(db: JavaDB) -> *SwitchLabelStatementDO { for (tmp in db.switch_label_statement) { yield SwitchLabelStatementDO { element_hash_id : tmp.element_hash_id, @@ -4439,7 +4439,7 @@ schema SwitchStatementDO { impl SwitchStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SwitchStatementDO { + pub fn __all__(db: JavaDB) -> *SwitchStatementDO { for (tmp in db.switch_statement) { yield SwitchStatementDO { element_hash_id : tmp.element_hash_id, @@ -4474,7 +4474,7 @@ schema SynchronizedStatementDO { impl SynchronizedStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *SynchronizedStatementDO { + pub fn __all__(db: JavaDB) -> *SynchronizedStatementDO { for (tmp in db.synchronized_statement) { yield SynchronizedStatementDO { element_hash_id : tmp.element_hash_id, @@ -4511,7 +4511,7 @@ schema ThisAccessExpressionDO { impl ThisAccessExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ThisAccessExpressionDO { + pub fn __all__(db: JavaDB) -> *ThisAccessExpressionDO { for (tmp in db.this_access_expression) { yield ThisAccessExpressionDO { element_hash_id : tmp.element_hash_id @@ -4529,7 +4529,7 @@ schema ThisExpressionWithQualifierDO { impl ThisExpressionWithQualifierDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ThisExpressionWithQualifierDO { + pub fn __all__(db: JavaDB) -> *ThisExpressionWithQualifierDO { for (tmp in db.this_expression_with_qualifier) { yield ThisExpressionWithQualifierDO { element_hash_id : tmp.element_hash_id, @@ -4556,7 +4556,7 @@ schema ThrowStatementDO { impl ThrowStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *ThrowStatementDO { + pub fn __all__(db: JavaDB) -> *ThrowStatementDO { for (tmp in db.throw_statement) { yield ThrowStatementDO { element_hash_id : tmp.element_hash_id, @@ -4592,7 +4592,7 @@ schema TokenDO { impl TokenDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TokenDO { + pub fn __all__(db: JavaDB) -> *TokenDO { for (tmp in db.token) { yield TokenDO { element_hash_id : tmp.element_hash_id, @@ -4635,7 +4635,7 @@ schema TryStatementWithFinallyDO { impl TryStatementWithFinallyDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TryStatementWithFinallyDO { + pub fn __all__(db: JavaDB) -> *TryStatementWithFinallyDO { for (tmp in db.try_statement_with_finally) { yield TryStatementWithFinallyDO { element_hash_id : tmp.element_hash_id, @@ -4669,7 +4669,7 @@ schema TryStatementWithoutFinallyDO { impl TryStatementWithoutFinallyDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TryStatementWithoutFinallyDO { + pub fn __all__(db: JavaDB) -> *TryStatementWithoutFinallyDO { for (tmp in db.try_statement_without_finally) { yield TryStatementWithoutFinallyDO { element_hash_id : tmp.element_hash_id, @@ -4695,7 +4695,7 @@ schema TypeCastExpressionDO { impl TypeCastExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeCastExpressionDO { + pub fn __all__(db: JavaDB) -> *TypeCastExpressionDO { for (tmp in db.type_cast_expression) { yield TypeCastExpressionDO { element_hash_id : tmp.element_hash_id, @@ -4724,7 +4724,7 @@ schema TypeElementDO { impl TypeElementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeElementDO { + pub fn __all__(db: JavaDB) -> *TypeElementDO { for (tmp in db.type_element) { yield TypeElementDO { element_hash_id : tmp.element_hash_id, @@ -4775,7 +4775,7 @@ schema TypeLiteralDO { impl TypeLiteralDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeLiteralDO { + pub fn __all__(db: JavaDB) -> *TypeLiteralDO { for (tmp in db.type_literal) { yield TypeLiteralDO { element_hash_id : tmp.element_hash_id, @@ -4814,7 +4814,7 @@ schema TypeParameterDO { impl TypeParameterDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeParameterDO { + pub fn __all__(db: JavaDB) -> *TypeParameterDO { for (tmp in db.type_parameter) { yield TypeParameterDO { element_hash_id : tmp.element_hash_id, @@ -4882,7 +4882,7 @@ schema UnaryExpressionDO { impl UnaryExpressionDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *UnaryExpressionDO { + pub fn __all__(db: JavaDB) -> *UnaryExpressionDO { for (tmp in db.unary_expression) { yield UnaryExpressionDO { element_hash_id : tmp.element_hash_id, @@ -4925,7 +4925,7 @@ schema WhileStatementDO { impl WhileStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *WhileStatementDO { + pub fn __all__(db: JavaDB) -> *WhileStatementDO { for (tmp in db.while_statement) { yield WhileStatementDO { element_hash_id : tmp.element_hash_id, @@ -4962,7 +4962,7 @@ schema YieldStatementDO { impl YieldStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *YieldStatementDO { + pub fn __all__(db: JavaDB) -> *YieldStatementDO { for (tmp in db.yield_statement) { yield YieldStatementDO { element_hash_id : tmp.element_hash_id, @@ -4997,7 +4997,7 @@ schema NpProjectDO { impl NpProjectDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpProjectDO { + pub fn __all__(db: JavaDB) -> *NpProjectDO { for (tmp in db.np_project) { yield NpProjectDO { element_hash_id : tmp.element_hash_id, @@ -5033,7 +5033,7 @@ schema NpFileDO { impl NpFileDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpFileDO { + pub fn __all__(db: JavaDB) -> *NpFileDO { for (tmp in db.np_file) { yield NpFileDO { element_hash_id : tmp.element_hash_id, @@ -5077,7 +5077,7 @@ schema NpClassDO { impl NpClassDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpClassDO { + pub fn __all__(db: JavaDB) -> *NpClassDO { for (tmp in db.np_class) { yield NpClassDO { element_hash_id : tmp.element_hash_id, @@ -5121,7 +5121,7 @@ schema NpInterfaceDO { impl NpInterfaceDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpInterfaceDO { + pub fn __all__(db: JavaDB) -> *NpInterfaceDO { for (tmp in db.np_interface) { yield NpInterfaceDO { element_hash_id : tmp.element_hash_id, @@ -5166,7 +5166,7 @@ schema NpMethodDO { impl NpMethodDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpMethodDO { + pub fn __all__(db: JavaDB) -> *NpMethodDO { for (tmp in db.np_method) { yield NpMethodDO { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/Documentation.gdl b/language/java/lib/Documentation.gdl index 8c40d7c2..d2bea511 100644 --- a/language/java/lib/Documentation.gdl +++ b/language/java/lib/Documentation.gdl @@ -7,7 +7,7 @@ schema Comment extends CommentDO { impl Comment { @data_constraint @inline - fn __all__(db: JavaDB) -> *Comment { + pub fn __all__(db: JavaDB) -> *Comment { for (tmp in CommentDO(db)) { yield Comment { element_hash_id : tmp.element_hash_id, @@ -61,7 +61,7 @@ schema JavadocComment extends JavadocCommentDO { impl JavadocComment { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocComment { + pub fn __all__(db: JavaDB) -> *JavadocComment { for (tmp in JavadocCommentDO(db)) { yield JavadocComment { element_hash_id : tmp.element_hash_id, @@ -126,7 +126,7 @@ schema JavadocTag extends JavadocTagDO { impl JavadocTag { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocTag { + pub fn __all__(db: JavaDB) -> *JavadocTag { for (tmp in JavadocTagDO(db)) { yield JavadocTag { element_hash_id : tmp.element_hash_id, @@ -192,7 +192,7 @@ schema JavadocTagValue extends JavadocTagValueDO { impl JavadocTagValue { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocTagValue { + pub fn __all__(db: JavaDB) -> *JavadocTagValue { for (tmp in JavadocTagValueDO(db)) { yield JavadocTagValue { element_hash_id : tmp.element_hash_id, @@ -245,7 +245,7 @@ schema JavadocDataToken extends JavadocDataTokenDO { impl JavadocDataToken { @data_constraint @inline - fn __all__(db: JavaDB) -> *JavadocDataToken { + pub fn __all__(db: JavaDB) -> *JavadocDataToken { for (tmp in JavadocDataTokenDO(db)) { yield JavadocDataToken { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/Expression.gdl b/language/java/lib/Expression.gdl index 6ecbb843..86457847 100644 --- a/language/java/lib/Expression.gdl +++ b/language/java/lib/Expression.gdl @@ -7,7 +7,7 @@ schema Expression extends ExpressionDO { impl Expression { @data_constraint @inline - fn __all__(db: JavaDB) -> *Expression { + pub fn __all__(db: JavaDB) -> *Expression { for (tmp in ExpressionDO(db)) { yield Expression { element_hash_id : tmp.element_hash_id, @@ -96,7 +96,7 @@ schema ArrayInitializer extends Expression { impl ArrayInitializer { @data_constraint @inline - fn __all__(db: JavaDB) -> *ArrayInitializer { + pub fn __all__(db: JavaDB) -> *ArrayInitializer { for (tmp in Expression(db)) { for (ai in ArrayInitializerExpression(db)) { if (ai.key_eq(tmp.getParent())) { @@ -129,7 +129,7 @@ schema ExpressionListElement extends Expression { impl ExpressionListElement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionListElement { + pub fn __all__(db: JavaDB) -> *ExpressionListElement { for (tmp in Expression(db)) { for (ele in ExpressionList(db)) { if (ele.key_eq(tmp.getParent())) { @@ -162,7 +162,7 @@ schema AssignmentExpression extends Expression { impl AssignmentExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *AssignmentExpression { + pub fn __all__(db: JavaDB) -> *AssignmentExpression { for (tmp in Expression(db)) { for (ae in AssignmentExpressionDO(db)) { if (tmp.key_eq(ae)) { @@ -229,7 +229,7 @@ schema BinaryExpression extends Expression { impl BinaryExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *BinaryExpression { + pub fn __all__(db: JavaDB) -> *BinaryExpression { for (tmp in Expression(db)) { for (be in BinaryExpressionDO(db)) { if (tmp.key_eq(be)) { @@ -313,7 +313,7 @@ schema AndLogicalExpression extends BinaryExpression { impl AndLogicalExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *AndLogicalExpression { + pub fn __all__(db: JavaDB) -> *AndLogicalExpression { for (tmp in BinaryExpression(db)) { for (be in BinaryExpression(db)) { if (tmp = be) { @@ -341,7 +341,7 @@ schema OrLogicalExpression extends BinaryExpression { impl OrLogicalExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *OrLogicalExpression { + pub fn __all__(db: JavaDB) -> *OrLogicalExpression { for (tmp in BinaryExpression(db)) { for (be in BinaryExpression(db)) { if (tmp = be) { @@ -366,7 +366,7 @@ schema ConditionalPolyadicExpression extends PolyadicExpression { impl ConditionalPolyadicExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConditionalPolyadicExpression { + pub fn __all__(db: JavaDB) -> *ConditionalPolyadicExpression { for (tmp in PolyadicExpression(db)) { for (p in PolyadicExpression(db)) { if (tmp = p) { @@ -404,7 +404,7 @@ schema UnaryExpression extends Expression { impl UnaryExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *UnaryExpression { + pub fn __all__(db: JavaDB) -> *UnaryExpression { for (tmp in Expression(db)) { for (ue in UnaryExpressionDO(db)) { if (tmp.key_eq(ue)) { @@ -457,7 +457,7 @@ schema LogNotExpression extends UnaryExpression { impl LogNotExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *LogNotExpression { + pub fn __all__(db: JavaDB) -> *LogNotExpression { for (tmp in UnaryExpression(db)) { if (tmp.getOpcode() = "!") { yield LogNotExpression { @@ -481,7 +481,7 @@ schema LogicExpression extends Expression { impl LogicExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *LogicExpression { + pub fn __all__(db: JavaDB) -> *LogicExpression { for (tmp in Expression(db)) { for (lne in LogNotExpression(db)) { if (tmp.key_eq(lne)) { @@ -565,7 +565,7 @@ schema ConditionalExpression extends Expression { impl ConditionalExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConditionalExpression { + pub fn __all__(db: JavaDB) -> *ConditionalExpression { for (tmp in Expression(db)) { for (ce in ConditionalExpressionDO(db)) { if (tmp.key_eq(ce)) { @@ -633,7 +633,7 @@ schema LambdaExpression extends Expression { impl LambdaExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *LambdaExpression { + pub fn __all__(db: JavaDB) -> *LambdaExpression { for (tmp in Expression(db)) { for (le in LambdaExpressionDO(db)) { if (tmp.key_eq(le)) { @@ -684,7 +684,7 @@ schema ThisAccessExpression extends Expression { impl ThisAccessExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ThisAccessExpression { + pub fn __all__(db: JavaDB) -> *ThisAccessExpression { for (tmp in Expression(db)) { for (tae in ThisAccessExpressionDO(db)) { if (tmp.key_eq(tae)) { @@ -710,7 +710,7 @@ schema NewExpression extends Expression { impl NewExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *NewExpression { + pub fn __all__(db: JavaDB) -> *NewExpression { for (tmp in Expression(db)) { for (ne in NewExpressionDO(db)) { if (tmp.key_eq(ne)) { @@ -778,7 +778,7 @@ schema SuperAccessExpression extends Expression { impl SuperAccessExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperAccessExpression { + pub fn __all__(db: JavaDB) -> *SuperAccessExpression { for (tmp in Expression(db)) { for (sae in SuperAccessExpressionDO(db)) { if (tmp.key_eq(sae)) { @@ -817,7 +817,7 @@ schema SuperConstructorInvocation extends Expression { impl SuperConstructorInvocation { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperConstructorInvocation { + pub fn __all__(db: JavaDB) -> *SuperConstructorInvocation { for (tmp in Expression(db)) { for (sci in SuperConstructorInvocationDO(db)) { if (tmp.key_eq(sci)) { @@ -856,7 +856,7 @@ schema ReferenceExpression extends Expression { impl ReferenceExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceExpression { + pub fn __all__(db: JavaDB) -> *ReferenceExpression { for (tmp in Expression(db)) { for (re in ReferenceExpressionDO(db)) { if (tmp.key_eq(re)) { @@ -924,7 +924,7 @@ schema StatementEnclosingExpression extends StatementEnclosingExpressionDO { impl StatementEnclosingExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *StatementEnclosingExpression { + pub fn __all__(db: JavaDB) -> *StatementEnclosingExpression { for (tmp in StatementEnclosingExpressionDO(db)) { yield StatementEnclosingExpression { expression_hash_id : tmp.expression_hash_id, @@ -953,7 +953,7 @@ schema InstanceofExpression extends Expression { impl InstanceofExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *InstanceofExpression { + pub fn __all__(db: JavaDB) -> *InstanceofExpression { for (tmp in Expression(db)) { for (ioe in InstanceofExpressionDO(db)) { if (tmp.key_eq(ioe)) { @@ -1004,7 +1004,7 @@ schema MethodAccessExpressionWithType extends Expression { impl MethodAccessExpressionWithType { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodAccessExpressionWithType { + pub fn __all__(db: JavaDB) -> *MethodAccessExpressionWithType { for (tmp in Expression(db)) { for (m in MethodAccessExpressionWithTypeDO(db)) { if (tmp.key_eq(m)) { @@ -1055,7 +1055,7 @@ schema MethodAccessExpressionWithoutType extends Expression { impl MethodAccessExpressionWithoutType { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodAccessExpressionWithoutType { + pub fn __all__(db: JavaDB) -> *MethodAccessExpressionWithoutType { for (tmp in Expression(db)) { for (m in MethodAccessExpressionWithoutTypeDO(db)) { if (tmp.key_eq(m)) { @@ -1095,7 +1095,7 @@ schema MethodAccessExpression extends Expression { impl MethodAccessExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodAccessExpression { + pub fn __all__(db: JavaDB) -> *MethodAccessExpression { for (tmp in Expression(db)) { for (mae in MethodAccessExpressionWithoutType(db)) { if (tmp.key_eq(mae)) { @@ -1235,7 +1235,7 @@ schema MethodReferenceExpression extends Expression { impl MethodReferenceExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *MethodReferenceExpression { + pub fn __all__(db: JavaDB) -> *MethodReferenceExpression { for (tmp in Expression(db)) { for (m in MethodReferenceExpressionDO(db)) { if (tmp.key_eq(m)) { @@ -1330,7 +1330,7 @@ schema ConstructorInvocation extends Expression { impl ConstructorInvocation { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConstructorInvocation { + pub fn __all__(db: JavaDB) -> *ConstructorInvocation { for (tmp in Expression(db)) { for (ci in ConstructorInvocationDO(db)) { if (tmp.key_eq(ci)) { @@ -1401,7 +1401,7 @@ schema ReferenceList extends ReferenceListDO { impl ReferenceList { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceList { + pub fn __all__(db: JavaDB) -> *ReferenceList { for (tmp in ReferenceListDO(db)) { yield ReferenceList { element_hash_id : tmp.element_hash_id, @@ -1466,7 +1466,7 @@ schema TypeCastExpression extends Expression { impl TypeCastExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeCastExpression { + pub fn __all__(db: JavaDB) -> *TypeCastExpression { for (tmp in Expression(db)) { for (m in TypeCastExpressionDO(db)) { if (tmp.key_eq(m)) { @@ -1514,7 +1514,7 @@ schema PolyadicExpression extends Expression { impl PolyadicExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *PolyadicExpression { + pub fn __all__(db: JavaDB) -> *PolyadicExpression { for (tmp in Expression(db)) { for (m in PolyadicExpressionDO(db)) { if (tmp.key_eq(m)) { diff --git a/language/java/lib/Identifier.gdl b/language/java/lib/Identifier.gdl index b62d98c7..eacc6679 100644 --- a/language/java/lib/Identifier.gdl +++ b/language/java/lib/Identifier.gdl @@ -7,7 +7,7 @@ schema Identifier extends IdentifierDO { impl Identifier { @data_constraint @inline - fn __all__(db: JavaDB) -> *Identifier { + pub fn __all__(db: JavaDB) -> *Identifier { for (tmp in IdentifierDO(db)) { yield Identifier { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/Literal.gdl b/language/java/lib/Literal.gdl index 167c4b64..8e678ddf 100644 --- a/language/java/lib/Literal.gdl +++ b/language/java/lib/Literal.gdl @@ -7,7 +7,7 @@ schema Literal extends Expression { impl Literal { @data_constraint @inline - fn __all__(db: JavaDB) -> *Literal { + pub fn __all__(db: JavaDB) -> *Literal { for (tmp in Expression(db)) { for (s in StringLiteralDO(db)) { if (tmp.key_eq(s)) { @@ -243,7 +243,7 @@ schema StringLiteral extends Literal { impl StringLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *StringLiteral { + pub fn __all__(db: JavaDB) -> *StringLiteral { for (tmp in Literal(db)) { for (l in StringLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -279,7 +279,7 @@ schema DoubleLiteral extends Literal { impl DoubleLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *DoubleLiteral { + pub fn __all__(db: JavaDB) -> *DoubleLiteral { for (tmp in Literal(db)) { for (l in DoubleLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -305,7 +305,7 @@ schema IntegerLiteral extends Literal { impl IntegerLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *IntegerLiteral { + pub fn __all__(db: JavaDB) -> *IntegerLiteral { for (tmp in Literal(db)) { for (l in IntegerLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -331,7 +331,7 @@ schema FloatingPointLiteral extends Literal { impl FloatingPointLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *FloatingPointLiteral { + pub fn __all__(db: JavaDB) -> *FloatingPointLiteral { for (tmp in Literal(db)) { for (l in FloatingPointLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -357,7 +357,7 @@ schema LongLiteral extends Literal { impl LongLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *LongLiteral { + pub fn __all__(db: JavaDB) -> *LongLiteral { for (tmp in Literal(db)) { for (l in LongLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -383,7 +383,7 @@ schema NullLiteral extends Literal { impl NullLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *NullLiteral { + pub fn __all__(db: JavaDB) -> *NullLiteral { for (tmp in Literal(db)) { for (l in NullLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -409,7 +409,7 @@ schema CharacterLiteral extends Literal { impl CharacterLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *CharacterLiteral { + pub fn __all__(db: JavaDB) -> *CharacterLiteral { for (tmp in Literal(db)) { for (l in CharacterLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -435,7 +435,7 @@ schema BooleanLiteral extends Literal { impl BooleanLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *BooleanLiteral { + pub fn __all__(db: JavaDB) -> *BooleanLiteral { for (tmp in Literal(db)) { for (l in BooleanLiteralDO(db)) { if (tmp.key_eq(l)) { @@ -461,7 +461,7 @@ schema TypeLiteral extends Expression { impl TypeLiteral { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeLiteral { + pub fn __all__(db: JavaDB) -> *TypeLiteral { for (tmp in Expression(db)) { for (t in TypeLiteralDO(db)) { if (tmp.key_eq(t)) { diff --git a/language/java/lib/Location.gdl b/language/java/lib/Location.gdl index c622a60c..4ece0e9a 100644 --- a/language/java/lib/Location.gdl +++ b/language/java/lib/Location.gdl @@ -7,7 +7,7 @@ schema Location extends LocationDO { impl Location { @data_constraint @inline - fn __all__(db: JavaDB) -> *Location { + pub fn __all__(db: JavaDB) -> *Location { for (tmp in LocationDO(db)) { yield Location { element_hash_id : tmp.element_hash_id, @@ -40,7 +40,7 @@ schema NumberOfLines extends NumberOfLinesDO { impl NumberOfLines { @data_constraint @inline - fn __all__(db: JavaDB) -> *NumberOfLines { + pub fn __all__(db: JavaDB) -> *NumberOfLines { for (tmp in NumberOfLinesDO(db)) { yield NumberOfLines { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/Method.gdl b/language/java/lib/Method.gdl index fc98301b..a7dd1684 100644 --- a/language/java/lib/Method.gdl +++ b/language/java/lib/Method.gdl @@ -7,7 +7,7 @@ schema Method extends MethodDO { impl Method { @data_constraint @inline - fn __all__(db: JavaDB) -> *Method { + pub fn __all__(db: JavaDB) -> *Method { for (tmp in MethodDO(db)) { yield Method { element_hash_id : tmp.element_hash_id, @@ -197,7 +197,7 @@ schema Exception extends ExceptionDO { impl Exception { @data_constraint @inline - fn __all__(db: JavaDB) -> *Exception { + pub fn __all__(db: JavaDB) -> *Exception { for (tmp in ExceptionDO(db)) { yield Exception { element_hash_id : tmp.element_hash_id, @@ -250,7 +250,7 @@ schema SuperExpression extends Expression { impl SuperExpression { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperExpression { + pub fn __all__(db: JavaDB) -> *SuperExpression { for (tmp in Expression(db)) { for (s in SuperExpressionDO(db)) { if (tmp.key_eq(s)) { @@ -276,7 +276,7 @@ schema SuperExpressionWithQualifier extends SuperExpression { impl SuperExpressionWithQualifier { @data_constraint @inline - fn __all__(db: JavaDB) -> *SuperExpressionWithQualifier { + pub fn __all__(db: JavaDB) -> *SuperExpressionWithQualifier { for (tmp in SuperExpression(db)) { for (s in SuperExpressionWithQualifierDO(db)) { if (tmp.key_eq(s)) { @@ -314,7 +314,7 @@ schema NpMethod extends NpMethodDO { impl NpMethod { @data_constraint @inline - fn __all__(db: JavaDB) -> *NpMethod { + pub fn __all__(db: JavaDB) -> *NpMethod { for (tmp in NpMethodDO(db)) { for (m in NpMethodDO(db)) { if (tmp = m) { diff --git a/language/java/lib/Modifier.gdl b/language/java/lib/Modifier.gdl index c2dbf9a5..e7013a02 100644 --- a/language/java/lib/Modifier.gdl +++ b/language/java/lib/Modifier.gdl @@ -7,7 +7,7 @@ schema Modifier extends ModifierDO { impl Modifier { @data_constraint @inline - fn __all__(db: JavaDB) -> *Modifier { + pub fn __all__(db: JavaDB) -> *Modifier { for (tmp in ModifierDO(db)) { yield Modifier { element_hash_id : tmp.element_hash_id, @@ -71,7 +71,7 @@ schema ModifierList extends ModifierListDO { impl ModifierList { @data_constraint @inline - fn __all__(db: JavaDB) -> *ModifierList { + pub fn __all__(db: JavaDB) -> *ModifierList { for (tmp in ModifierListDO(db)) { yield ModifierList { element_hash_id : tmp.element_hash_id, diff --git a/language/java/lib/Parameter.gdl b/language/java/lib/Parameter.gdl index 9270d0d9..a3d6128b 100644 --- a/language/java/lib/Parameter.gdl +++ b/language/java/lib/Parameter.gdl @@ -7,7 +7,7 @@ schema Parameter extends ParameterDO { impl Parameter { @data_constraint @inline - fn __all__(db: JavaDB) -> *Parameter { + pub fn __all__(db: JavaDB) -> *Parameter { for (tmp in ParameterDO(db)) { yield Parameter { element_hash_id : tmp.element_hash_id, @@ -123,7 +123,7 @@ schema TypeParameter extends TypeParameterDO { impl TypeParameter { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeParameter { + pub fn __all__(db: JavaDB) -> *TypeParameter { for (tmp in TypeParameterDO(db)) { yield TypeParameter { element_hash_id : tmp.element_hash_id, @@ -201,7 +201,7 @@ schema Variable { impl Variable { @data_constraint @inline - fn __all__(db: JavaDB) -> *Variable { + pub fn __all__(db: JavaDB) -> *Variable { for (l in LocalVariable(db)) { yield Variable {id : l.element_hash_id} } diff --git a/language/java/lib/Parent.gdl b/language/java/lib/Parent.gdl index c5cca2a5..1ac55084 100644 --- a/language/java/lib/Parent.gdl +++ b/language/java/lib/Parent.gdl @@ -7,7 +7,7 @@ schema ElementParent { impl ElementParent { @data_constraint @inline - fn __all__(db: JavaDB) -> *ElementParent { + pub fn __all__(db: JavaDB) -> *ElementParent { for (s in Statement(db)) { yield ElementParent {id : s.element_hash_id} } @@ -1170,7 +1170,7 @@ schema StatementParent extends ElementParent { impl StatementParent { @data_constraint @inline - fn __all__(db: JavaDB) -> *StatementParent { + pub fn __all__(db: JavaDB) -> *StatementParent { for (tmp in ElementParent(db)) { for (s in Statement(db)) { if (tmp = s.getParent()) { @@ -1202,7 +1202,7 @@ schema ExpressionParent extends ElementParent { impl ExpressionParent { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionParent { + pub fn __all__(db: JavaDB) -> *ExpressionParent { for (tmp in ElementParent(db)) { for (s in Expression(db)) { if (tmp = s.getParent()) { diff --git a/language/java/lib/Statement.gdl b/language/java/lib/Statement.gdl index 4de173a7..2b922619 100644 --- a/language/java/lib/Statement.gdl +++ b/language/java/lib/Statement.gdl @@ -7,7 +7,7 @@ schema Statement extends StatementDO { impl Statement { @data_constraint @inline - fn __all__(db: JavaDB) -> *Statement { + pub fn __all__(db: JavaDB) -> *Statement { for (tmp in StatementDO(db)) { yield Statement { element_hash_id : tmp.element_hash_id, @@ -127,7 +127,7 @@ schema CallableEnclosingStatement extends CallableEnclosingStatementDO { impl CallableEnclosingStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *CallableEnclosingStatement { + pub fn __all__(db: JavaDB) -> *CallableEnclosingStatement { for (tmp in CallableEnclosingStatementDO(db)) { yield CallableEnclosingStatement { statement_hash_id : tmp.statement_hash_id, @@ -156,7 +156,7 @@ schema BlockStatement extends Statement { impl BlockStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *BlockStatement { + pub fn __all__(db: JavaDB) -> *BlockStatement { for (tmp in Statement(db)) { for (bs in BlockStatementDO(db)) { if (tmp.key_eq(bs)) { @@ -240,7 +240,7 @@ schema CodeBlock extends CodeBlockDO { impl CodeBlock { @data_constraint @inline - fn __all__(db: JavaDB) -> *CodeBlock { + pub fn __all__(db: JavaDB) -> *CodeBlock { for (tmp in CodeBlockDO(db)) { yield CodeBlock { element_hash_id : tmp.element_hash_id, @@ -319,7 +319,7 @@ schema AssertStatement extends Statement { impl AssertStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *AssertStatement { + pub fn __all__(db: JavaDB) -> *AssertStatement { for (tmp in Statement(db)) { for (s in AssertStatementDO(db)) { if (tmp.key_eq(s)) { @@ -373,7 +373,7 @@ schema PackageStatement extends PackageStatementDO { impl PackageStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *PackageStatement { + pub fn __all__(db: JavaDB) -> *PackageStatement { for (tmp in PackageStatementDO(db)) { yield PackageStatement { element_hash_id : tmp.element_hash_id, @@ -449,7 +449,7 @@ schema LocalClass extends LocalClassDO { impl LocalClass { @data_constraint @inline - fn __all__(db: JavaDB) -> *LocalClass { + pub fn __all__(db: JavaDB) -> *LocalClass { for (tmp in LocalClassDO(db)) { yield LocalClass { element_hash_id : tmp.element_hash_id, @@ -503,7 +503,7 @@ schema EmptyStatement extends Statement { impl EmptyStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *EmptyStatement { + pub fn __all__(db: JavaDB) -> *EmptyStatement { for (tmp in Statement(db)) { for (s in EmptyStatementDO(db)) { if (tmp.key_eq(s)) { @@ -529,7 +529,7 @@ schema ReturnStatement extends Statement { impl ReturnStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReturnStatement { + pub fn __all__(db: JavaDB) -> *ReturnStatement { for (tmp in Statement(db)) { for (ret in ReturnStatementDO(db)) { if (tmp.key_eq(ret)) { @@ -569,7 +569,7 @@ schema DeclarationStatementDO { impl DeclarationStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *DeclarationStatementDO { + pub fn __all__(db: JavaDB) -> *DeclarationStatementDO { for (tmp: DeclarationElementDO in db.declaration_element) { yield DeclarationStatementDO { id: tmp.declaration_statement_hash_id } } @@ -584,7 +584,7 @@ schema DeclarationStatement extends Statement { impl DeclarationStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *DeclarationStatement { + pub fn __all__(db: JavaDB) -> *DeclarationStatement { for (tmp in Statement(db)) { for (dsr in DeclarationStatementDO(db)) { if (tmp.key_eq(dsr)) { @@ -640,7 +640,7 @@ schema DeclaredElement extends DeclarationElementDO { impl DeclaredElement { @data_constraint @inline - fn __all__(db: JavaDB) -> *DeclaredElement { + pub fn __all__(db: JavaDB) -> *DeclaredElement { for (tmp in DeclarationElementDO(db)) { yield DeclaredElement { element_hash_id : tmp.element_hash_id, @@ -692,7 +692,7 @@ schema ThrowStatement extends Statement { impl ThrowStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ThrowStatement { + pub fn __all__(db: JavaDB) -> *ThrowStatement { for (tmp in Statement(db)) { for (ths in ThrowStatementDO(db)) { if (tmp.key_eq(ths)) { @@ -760,7 +760,7 @@ schema LabeledStatement extends Statement { impl LabeledStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *LabeledStatement { + pub fn __all__(db: JavaDB) -> *LabeledStatement { for (tmp in Statement(db)) { for (ls in LabeledStatementDO(db)) { if (tmp.key_eq(ls)) { @@ -821,7 +821,7 @@ schema ContinueStatement extends Statement { impl ContinueStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ContinueStatement { + pub fn __all__(db: JavaDB) -> *ContinueStatement { for (tmp in Statement(db)) { for (cs in ContinueStatementDO(db)) { if (tmp.key_eq(cs)) { @@ -861,7 +861,7 @@ schema YieldStatement extends Statement { impl YieldStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *YieldStatement { + pub fn __all__(db: JavaDB) -> *YieldStatement { for (tmp in Statement(db)) { for (ys in YieldStatementDO(db)) { if (tmp.key_eq(ys)) { @@ -887,7 +887,7 @@ schema ExpressionStatement extends Statement { impl ExpressionStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ExpressionStatement { + pub fn __all__(db: JavaDB) -> *ExpressionStatement { for (tmp in Statement(db)) { for (es in ExpressionStatementDO(db)) { if (tmp.key_eq(es)) { @@ -924,7 +924,7 @@ schema JumpStatement extends Statement { impl JumpStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *JumpStatement { + pub fn __all__(db: JavaDB) -> *JumpStatement { for (tmp in Statement(db)) { for (bStmt in BreakStatement(db)) { if (tmp.key_eq(bStmt)) { @@ -1039,7 +1039,7 @@ schema NameString extends NameStringDO { impl NameString { @data_constraint @inline - fn __all__(db: JavaDB) -> *NameString { + pub fn __all__(db: JavaDB) -> *NameString { for (tmp in NameStringDO(db)) { yield NameString { parent_hash_id : tmp.parent_hash_id, @@ -1077,7 +1077,7 @@ schema TryStatementDO { impl TryStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *TryStatementDO { + pub fn __all__(db: JavaDB) -> *TryStatementDO { for (t in TryStatementWithFinallyDO(db)) { yield TryStatementDO {id : t.element_hash_id} } @@ -1118,7 +1118,7 @@ schema TryStatement extends Statement { impl TryStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *TryStatement { + pub fn __all__(db: JavaDB) -> *TryStatement { for (tmp in Statement(db)) { for (ts in TryStatementDO(db)) { if (tmp.key_eq(ts)) { @@ -1216,7 +1216,7 @@ schema CatchClause extends CatchSectionDO { impl CatchClause { @data_constraint @inline - fn __all__(db: JavaDB) -> *CatchClause { + pub fn __all__(db: JavaDB) -> *CatchClause { for (tmp in CatchSectionDO(db)) { yield CatchClause { element_hash_id : tmp.element_hash_id, @@ -1316,7 +1316,7 @@ schema BreakStatement extends Statement { impl BreakStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *BreakStatement { + pub fn __all__(db: JavaDB) -> *BreakStatement { for (tmp in Statement(db)) { for (bs in BreakStatementDO(db)) { if (tmp.key_eq(bs)) { @@ -1356,7 +1356,7 @@ schema ConditionalStatement extends Statement { impl ConditionalStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConditionalStatement { + pub fn __all__(db: JavaDB) -> *ConditionalStatement { for (tmp in Statement(db)) { for (ifs in IfStatement(db)) { if (tmp.key_eq(ifs)) { @@ -1451,7 +1451,7 @@ schema IfStatementDO { impl IfStatementDO { @data_constraint @inline - fn __all__(db: JavaDB) -> *IfStatementDO { + pub fn __all__(db: JavaDB) -> *IfStatementDO { for (i in IfStatementWithElseDO(db)) { yield IfStatementDO {id : i.element_hash_id} } @@ -1500,7 +1500,7 @@ schema IfStatement extends Statement { impl IfStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *IfStatement { + pub fn __all__(db: JavaDB) -> *IfStatement { for (tmp in Statement(db)) { for (ifs in IfStatementDO(db)) { if (tmp.key_eq(ifs)) { @@ -1568,7 +1568,7 @@ schema ForStatement extends Statement { impl ForStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ForStatement { + pub fn __all__(db: JavaDB) -> *ForStatement { for (tmp in Statement(db)) { for (fs in ForStatementDO(db)) { if (tmp.key_eq(fs)) { @@ -1657,7 +1657,7 @@ schema ForeachStatement extends Statement { impl ForeachStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ForeachStatement { + pub fn __all__(db: JavaDB) -> *ForeachStatement { for (tmp in Statement(db)) { for (fs in ForeachStatementDO(db)) { if (tmp.key_eq(fs)) { @@ -1725,7 +1725,7 @@ schema WhileStatement extends Statement { impl WhileStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *WhileStatement { + pub fn __all__(db: JavaDB) -> *WhileStatement { for (tmp in Statement(db)) { for (ws in WhileStatementDO(db)) { if (tmp.key_eq(ws)) { @@ -1779,7 +1779,7 @@ schema DoWhileStatement extends Statement { impl DoWhileStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *DoWhileStatement { + pub fn __all__(db: JavaDB) -> *DoWhileStatement { for (tmp in Statement(db)) { for (dw in DoWhileStatementDO(db)) { if (tmp.key_eq(dw)) { @@ -1833,7 +1833,7 @@ schema LoopStatement extends Statement { impl LoopStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *LoopStatement { + pub fn __all__(db: JavaDB) -> *LoopStatement { for (tmp in Statement(db)) { for (fs in ForStatement(db)) { if (tmp.key_eq(fs)) { @@ -1895,7 +1895,7 @@ schema SwitchStatement extends Statement { impl SwitchStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *SwitchStatement { + pub fn __all__(db: JavaDB) -> *SwitchStatement { for (tmp in Statement(db)) { for (ss in SwitchStatementDO(db)) { if (tmp.key_eq(ss)) { @@ -1989,7 +1989,7 @@ schema SwitchLabelStatement extends Statement { impl SwitchLabelStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *SwitchLabelStatement { + pub fn __all__(db: JavaDB) -> *SwitchLabelStatement { for (tmp in Statement(db)) { for (sl in SwitchLabelStatementDO(db)) { if (tmp.key_eq(sl)) { @@ -2124,7 +2124,7 @@ schema DefaultSwitchLabelStatement extends SwitchLabelStatement { impl DefaultSwitchLabelStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *DefaultSwitchLabelStatement { + pub fn __all__(db: JavaDB) -> *DefaultSwitchLabelStatement { for (tmp in SwitchLabelStatement(db)) { if (tmp.isDefaultValue() = -1) { yield DefaultSwitchLabelStatement { @@ -2145,7 +2145,7 @@ schema ConstSwitchLabelStatement extends SwitchLabelStatement { impl ConstSwitchLabelStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *ConstSwitchLabelStatement { + pub fn __all__(db: JavaDB) -> *ConstSwitchLabelStatement { for (tmp in SwitchLabelStatement(db)) { for (ss in SwitchLabelStatement(db)) { if (tmp = ss) { @@ -2173,7 +2173,7 @@ schema SynchronizedStatement extends Statement { impl SynchronizedStatement { @data_constraint @inline - fn __all__(db: JavaDB) -> *SynchronizedStatement { + pub fn __all__(db: JavaDB) -> *SynchronizedStatement { for (tmp in Statement(db)) { for (ss in SynchronizedStatementDO(db)) { if (tmp.key_eq(ss)) { diff --git a/language/java/lib/Type.gdl b/language/java/lib/Type.gdl index 7eb8f981..b8cdd70f 100644 --- a/language/java/lib/Type.gdl +++ b/language/java/lib/Type.gdl @@ -7,7 +7,7 @@ schema Type { impl Type { @data_constraint @inline - fn __all__(db: JavaDB) -> *Type { + pub fn __all__(db: JavaDB) -> *Type { for (r in ReferenceType(db)) { yield Type {id : r.oid} } @@ -82,7 +82,7 @@ schema ReferenceType extends ReferenceTypeDO { impl ReferenceType { @data_constraint @inline - fn __all__(db: JavaDB) -> *ReferenceType { + pub fn __all__(db: JavaDB) -> *ReferenceType { for (tmp in ReferenceTypeDO(db)) { yield ReferenceType { oid : tmp.oid, @@ -101,7 +101,7 @@ schema TypeElement extends TypeElementDO { impl TypeElement { @data_constraint @inline - fn __all__(db: JavaDB) -> *TypeElement { + pub fn __all__(db: JavaDB) -> *TypeElement { for (tmp in TypeElementDO(db)) { yield TypeElement { element_hash_id : tmp.element_hash_id, @@ -166,7 +166,7 @@ schema Primitive extends PrimitiveDO { impl Primitive { @data_constraint @inline - fn __all__(db: JavaDB) -> *Primitive { + pub fn __all__(db: JavaDB) -> *Primitive { for (tmp in PrimitiveDO(db)) { yield Primitive { oid : tmp.oid, diff --git a/language/java/lib/token.gdl b/language/java/lib/token.gdl index da449b33..edd4605c 100644 --- a/language/java/lib/token.gdl +++ b/language/java/lib/token.gdl @@ -7,7 +7,7 @@ schema Token extends TokenDO { impl Token { @data_constraint @inline - fn __all__(db: JavaDB) -> *Token { + pub fn __all__(db: JavaDB) -> *Token { for (tmp in TokenDO(db)) { yield Token { element_hash_id : tmp.element_hash_id, diff --git a/language/javascript/lib/AlipayMiniProgram.gdl b/language/javascript/lib/AlipayMiniProgram.gdl index 83cda7ef..497b4620 100644 --- a/language/javascript/lib/AlipayMiniProgram.gdl +++ b/language/javascript/lib/AlipayMiniProgram.gdl @@ -12,7 +12,7 @@ schema AppJsFile extends File { impl AppJsFile { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AppJsFile { + pub fn __all__(db: JavascriptDB) -> *AppJsFile { for (tmp in File(db)) { if (tmp.getRelativePath() = "app.js") { yield AppJsFile { @@ -36,7 +36,7 @@ schema AppRegistrationExpression extends CallExpression { impl AppRegistrationExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AppRegistrationExpression { + pub fn __all__(db: JavascriptDB) -> *AppRegistrationExpression { for (tmp in CallExpression(db)) { for (appIdentifier in Identifier(db), location in Location(db), @@ -66,7 +66,7 @@ schema AppObject extends ObjectLiteralExpression { impl AppObject { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AppObject { + pub fn __all__(db: JavascriptDB) -> *AppObject { for (tmp in ObjectLiteralExpression(db)) { for (appRegistrationExpression in AppRegistrationExpression(db)) { if (tmp.key_eq(appRegistrationExpression.getArgument(0))) { @@ -88,7 +88,7 @@ schema PageRegistrationExpression extends CallExpression { impl PageRegistrationExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PageRegistrationExpression { + pub fn __all__(db: JavascriptDB) -> *PageRegistrationExpression { for (tmp in CallExpression(db)) { for (pageIdentifier in Identifier(db)) { if (pageIdentifier.key_eq(tmp.getExpression())) { @@ -112,7 +112,7 @@ schema PageObject extends ObjectLiteralExpression { impl PageObject { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PageObject { + pub fn __all__(db: JavascriptDB) -> *PageObject { for (tmp in ObjectLiteralExpression(db)) { for (pageRegistrationExpression in PageRegistrationExpression(db)) { if (tmp.key_eq(pageRegistrationExpression.getArgument(0))) { @@ -134,7 +134,7 @@ schema ComponentRegistrationExpression extends CallExpression { impl ComponentRegistrationExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ComponentRegistrationExpression { + pub fn __all__(db: JavascriptDB) -> *ComponentRegistrationExpression { for (tmp in CallExpression(db)) { for (componentIdentifier in Identifier(db)) { if (componentIdentifier.key_eq(tmp.getExpression())) { @@ -158,7 +158,7 @@ schema ComponentObject extends ObjectLiteralExpression { impl ComponentObject { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ComponentObject { + pub fn __all__(db: JavascriptDB) -> *ComponentObject { for (tmp in ObjectLiteralExpression(db)) { for (componentRegistrationExpression in ComponentRegistrationExpression(db)) { if (tmp.key_eq(componentRegistrationExpression.getArgument(0))) { @@ -180,7 +180,7 @@ schema MiniObject extends ObjectLiteralExpression { impl MiniObject { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MiniObject { + pub fn __all__(db: JavascriptDB) -> *MiniObject { for (tmp in ObjectLiteralExpression(db)) { for (appObject in AppObject(db)) { if (tmp.key_eq(appObject)) { @@ -216,7 +216,7 @@ schema ApiCallExpression extends CallExpression { impl ApiCallExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ApiCallExpression { + pub fn __all__(db: JavascriptDB) -> *ApiCallExpression { for (tmp in CallExpression(db)) { for (accessExpression in AccessExpression(db), myIdentifier in Identifier(db)) { @@ -243,7 +243,7 @@ schema MiniCallExpression extends CallExpression { impl MiniCallExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MiniCallExpression { + pub fn __all__(db: JavascriptDB) -> *MiniCallExpression { for (tmp in CallExpression(db)) { yield MiniCallExpression { id : tmp.id diff --git a/language/javascript/lib/BasicBlock.gdl b/language/javascript/lib/BasicBlock.gdl index d4ba84aa..0a485fd4 100644 --- a/language/javascript/lib/BasicBlock.gdl +++ b/language/javascript/lib/BasicBlock.gdl @@ -9,7 +9,7 @@ schema BasicBlock extends ControlFlowNode { impl BasicBlock { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BasicBlock { + pub fn __all__(db: JavascriptDB) -> *BasicBlock { for (cfn in ControlFlowNode(db)) { // CfgEntryNode is a standalone BB for (cfgEntryNode in CfgEntryNode(db)) { diff --git a/language/javascript/lib/Class.gdl b/language/javascript/lib/Class.gdl index 02b399b6..ec06da5c 100644 --- a/language/javascript/lib/Class.gdl +++ b/language/javascript/lib/Class.gdl @@ -12,7 +12,7 @@ schema ClassLikeDeclaration extends Node { impl ClassLikeDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassLikeDeclaration { + pub fn __all__(db: JavascriptDB) -> *ClassLikeDeclaration { for (tmp in Node(db)) { if (isClassLikeDeclaration(tmp)) { yield ClassLikeDeclaration { @@ -32,7 +32,7 @@ schema ClassDeclaration extends ClassLikeDeclaration { impl ClassDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassDeclaration { + pub fn __all__(db: JavascriptDB) -> *ClassDeclaration { for (tmp in ClassLikeDeclaration(db)) { if (isClassDeclaration(Node {id: tmp.id})) { yield ClassDeclaration { @@ -52,7 +52,7 @@ schema ClassExpressionDeclaration extends ClassLikeDeclaration { impl ClassExpressionDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassExpressionDeclaration { + pub fn __all__(db: JavascriptDB) -> *ClassExpressionDeclaration { for (tmp in ClassLikeDeclaration(db)) { if (isClassExpression(Node {id: tmp.id})) { yield ClassExpressionDeclaration { @@ -72,7 +72,7 @@ schema ClassElement extends Node { impl ClassElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassElement { + pub fn __all__(db: JavascriptDB) -> *ClassElement { for (tmp in Node(db)) { if (isClassElement(tmp)) { yield ClassElement { @@ -92,7 +92,7 @@ schema PropertyDeclaration extends ClassElement { impl PropertyDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PropertyDeclaration { + pub fn __all__(db: JavascriptDB) -> *PropertyDeclaration { for (tmp in ClassElement(db)) { if (tmp.getKind() = 166) { yield PropertyDeclaration { @@ -266,7 +266,7 @@ schema MethodElement extends ClassElement { impl MethodElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MethodElement { + pub fn __all__(db: JavascriptDB) -> *MethodElement { for (tmp in ClassElement(db)) { if (tmp.getKind() = 168) { yield MethodElement { @@ -286,7 +286,7 @@ schema ClassStaticBlockElement extends ClassElement { impl ClassStaticBlockElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassStaticBlockElement { + pub fn __all__(db: JavascriptDB) -> *ClassStaticBlockElement { for (tmp in ClassElement(db)) { // ClassStaticBlockDeclaration if (tmp.getKind() = 169) { @@ -307,7 +307,7 @@ schema ConstructorElement extends ClassElement { impl ConstructorElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConstructorElement { + pub fn __all__(db: JavascriptDB) -> *ConstructorElement { for (tmp in ClassElement(db)) { if (tmp.getKind() = 170) { yield ConstructorElement { @@ -327,7 +327,7 @@ schema AccessorElement extends ClassElement { impl AccessorElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AccessorElement { + pub fn __all__(db: JavascriptDB) -> *AccessorElement { for (tmp in ClassElement(db)) { if (isAccessor(Node {id: tmp.id})) { yield AccessorElement { @@ -347,7 +347,7 @@ schema GetAccessorElement extends AccessorElement { impl GetAccessorElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GetAccessorElement { + pub fn __all__(db: JavascriptDB) -> *GetAccessorElement { for (tmp in AccessorElement(db)) { if (tmp.getKind() = 171) { yield GetAccessorElement { @@ -367,7 +367,7 @@ schema SetAccessorElement extends AccessorElement { impl SetAccessorElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SetAccessorElement { + pub fn __all__(db: JavascriptDB) -> *SetAccessorElement { for (tmp in AccessorElement(db)) { if (tmp.getKind() = 172) { yield SetAccessorElement { @@ -387,7 +387,7 @@ schema IndexSignature extends ClassElement { impl IndexSignature { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IndexSignature { + pub fn __all__(db: JavascriptDB) -> *IndexSignature { for (tmp in ClassElement(db)) { if (tmp.getKind() = 175) { yield IndexSignature { @@ -407,7 +407,7 @@ schema SemicolonClassElement extends ClassElement { impl SemicolonClassElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SemicolonClassElement { + pub fn __all__(db: JavascriptDB) -> *SemicolonClassElement { for (tmp in ClassElement(db)) { if (tmp.getKind() = 233) { yield SemicolonClassElement { diff --git a/language/javascript/lib/Comment.gdl b/language/javascript/lib/Comment.gdl index 8a6fa326..19b756c0 100644 --- a/language/javascript/lib/Comment.gdl +++ b/language/javascript/lib/Comment.gdl @@ -13,7 +13,7 @@ schema Comment extends CommentDO { impl Comment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Comment { + pub fn __all__(db: JavascriptDB) -> *Comment { for (tmp in CommentDO(db)) { yield Comment { oid : tmp.oid, diff --git a/language/javascript/lib/Completion.gdl b/language/javascript/lib/Completion.gdl index 4e6e7554..93079c52 100644 --- a/language/javascript/lib/Completion.gdl +++ b/language/javascript/lib/Completion.gdl @@ -8,7 +8,7 @@ impl Completion { @inline pub fn __all__() -> *Completion { yield Completion {id: 1001, name: "NormalCompletion"} - yield Completion {id: 1101, name: "ReturnCompletion"} + yield Completion {id: 1101, name: "ReturnCompletion"} // BooleanCompletion yield Completion {id: 1201, name: "BooleanCompletion"} yield Completion {id: 1202, name: "TrueBooleanCompletion"} diff --git a/language/javascript/lib/ControlFlowGraph.gdl b/language/javascript/lib/ControlFlowGraph.gdl index 5925f35b..0daff434 100644 --- a/language/javascript/lib/ControlFlowGraph.gdl +++ b/language/javascript/lib/ControlFlowGraph.gdl @@ -12,7 +12,7 @@ schema CfgEntryNode extends CfgEntryNodeDO { impl CfgEntryNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CfgEntryNode { + pub fn __all__(db: JavascriptDB) -> *CfgEntryNode { for (tmp in CfgEntryNodeDO(db)) { for (cfgEntryNodeDO in CfgEntryNodeDO(db)) { if (tmp = cfgEntryNodeDO) { @@ -43,7 +43,7 @@ schema CfgExitNode extends CfgExitNodeDO { impl CfgExitNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CfgExitNode { + pub fn __all__(db: JavascriptDB) -> *CfgExitNode { for (tmp in CfgExitNodeDO(db)) { yield CfgExitNode { oid : tmp.oid, @@ -71,7 +71,7 @@ schema SyntheticCfgNode { impl SyntheticCfgNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SyntheticCfgNode { + pub fn __all__(db: JavascriptDB) -> *SyntheticCfgNode { for (cfgEntryNode in CfgEntryNode(db)) { yield SyntheticCfgNode {id : cfgEntryNode.oid} } @@ -109,7 +109,7 @@ schema ControlFlowNode { impl ControlFlowNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ControlFlowNode { + pub fn __all__(db: JavascriptDB) -> *ControlFlowNode { for (node in Node(db)) { yield ControlFlowNode {id : node.id} } @@ -362,7 +362,7 @@ schema PostOrderNode extends ControlFlowNode { impl PostOrderNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PostOrderNode { + pub fn __all__(db: JavascriptDB) -> *PostOrderNode { for (tmp in ControlFlowNode(db)) { if (isPostOrderNode(tmp)) { yield PostOrderNode { diff --git a/language/javascript/lib/DOClass.gdl b/language/javascript/lib/DOClass.gdl index 6acbbf13..233db9a5 100644 --- a/language/javascript/lib/DOClass.gdl +++ b/language/javascript/lib/DOClass.gdl @@ -17,7 +17,7 @@ impl LocationDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *LocationDO { - for (tmp in db.location) { + for (tmp in db.location) { yield LocationDO { oid : tmp.oid, file_oid : tmp.file_oid, @@ -27,7 +27,7 @@ impl LocationDO { end_column_number : tmp.end_column_number, text : tmp.text } - } + } } pub fn getFileOid(self) -> int { @@ -66,14 +66,14 @@ impl NumberOfLinesDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *NumberOfLinesDO { - for (tmp in db.number_of_lines) { + for (tmp in db.number_of_lines) { yield NumberOfLinesDO { location_oid : tmp.location_oid, lines : tmp.lines, code_lines : tmp.code_lines, comment_lines : tmp.comment_lines } - } + } } pub fn getLines(self) -> int { @@ -101,7 +101,7 @@ impl FileDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *FileDO { - for (tmp in db.file) { + for (tmp in db.file) { yield FileDO { oid : tmp.oid, name : tmp.name, @@ -109,7 +109,7 @@ impl FileDO { relative_path : tmp.relative_path, location_oid : tmp.location_oid } - } + } } pub fn getName(self) -> string { @@ -140,14 +140,14 @@ impl DirectoryDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *DirectoryDO { - for (tmp in db.directory) { + for (tmp in db.directory) { yield DirectoryDO { oid : tmp.oid, name : tmp.name, relative_path : tmp.relative_path, location_oid : tmp.location_oid } - } + } } pub fn getName(self) -> string { @@ -172,12 +172,12 @@ impl DirectoryHierarchyDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *DirectoryHierarchyDO { - for (tmp in db.directory_hierarchy) { + for (tmp in db.directory_hierarchy) { yield DirectoryHierarchyDO { parent_oid : tmp.parent_oid, child_oid : tmp.child_oid } - } + } } pub fn getParentOid(self) -> int { @@ -195,13 +195,13 @@ impl TopLevelDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *TopLevelDO { - for (tmp in db.top_level) { + for (tmp in db.top_level) { yield TopLevelDO { oid : tmp.oid, kind : tmp.kind, location_oid : tmp.location_oid } - } + } } pub fn getKind(self) -> int { @@ -225,7 +225,7 @@ impl NodeDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *NodeDO { - for (tmp in db.node) { + for (tmp in db.node) { yield NodeDO { oid : tmp.oid, kind : tmp.kind, @@ -233,7 +233,7 @@ impl NodeDO { index : tmp.index, location_oid : tmp.location_oid } - } + } } pub fn getKind(self) -> int { @@ -262,12 +262,12 @@ impl LiteralDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *LiteralDO { - for (tmp in db.literal) { + for (tmp in db.literal) { yield LiteralDO { oid : tmp.oid, value : tmp.value } - } + } } pub fn getValue(self) -> string { @@ -284,12 +284,12 @@ impl BindingElementPropertyNameDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *BindingElementPropertyNameDO { - for (tmp in db.binding_element_property_name) { + for (tmp in db.binding_element_property_name) { yield BindingElementPropertyNameDO { oid : tmp.oid, property_name_oid : tmp.property_name_oid } - } + } } pub fn getPropertyNameOid(self) -> int { @@ -306,12 +306,12 @@ impl BindingElementNameDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *BindingElementNameDO { - for (tmp in db.binding_element_name) { + for (tmp in db.binding_element_name) { yield BindingElementNameDO { oid : tmp.oid, name_oid : tmp.name_oid } - } + } } pub fn getNameOid(self) -> int { @@ -328,12 +328,12 @@ impl BindingElementInitializerDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *BindingElementInitializerDO { - for (tmp in db.binding_element_initializer) { + for (tmp in db.binding_element_initializer) { yield BindingElementInitializerDO { oid : tmp.oid, initializer_oid : tmp.initializer_oid } - } + } } pub fn getInitializerOid(self) -> int { @@ -351,13 +351,13 @@ impl ClassLikeDeclarationDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *ClassLikeDeclarationDO { - for (tmp in db.class_like_declaration) { + for (tmp in db.class_like_declaration) { yield ClassLikeDeclarationDO { oid : tmp.oid, kind : tmp.kind, name : tmp.name } - } + } } pub fn getKind(self) -> int { @@ -379,13 +379,13 @@ impl FunctionLikeDeclarationDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *FunctionLikeDeclarationDO { - for (tmp in db.function_like_declaration) { + for (tmp in db.function_like_declaration) { yield FunctionLikeDeclarationDO { oid : tmp.oid, kind : tmp.kind, name : tmp.name } - } + } } pub fn getKind(self) -> int { @@ -406,12 +406,12 @@ impl FunctionEnclosingNodeDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *FunctionEnclosingNodeDO { - for (tmp in db.function_enclosing_node) { + for (tmp in db.function_enclosing_node) { yield FunctionEnclosingNodeDO { node_oid : tmp.node_oid, function_oid : tmp.function_oid } - } + } } pub fn getFunctionOid(self) -> int { @@ -428,12 +428,12 @@ impl ModifierDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *ModifierDO { - for (tmp in db.modifier) { + for (tmp in db.modifier) { yield ModifierDO { oid : tmp.oid, index : tmp.index } - } + } } pub fn getIndex(self) -> int { @@ -451,13 +451,13 @@ impl SymbolDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *SymbolDO { - for (tmp in db.symbol_) { + for (tmp in db.symbol_) { yield SymbolDO { oid : tmp.oid, name : tmp.name, description : tmp.description } - } + } } pub fn getName(self) -> string { @@ -478,12 +478,12 @@ impl NodeSymbolDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *NodeSymbolDO { - for (tmp in db.node_symbol) { + for (tmp in db.node_symbol) { yield NodeSymbolDO { node_oid : tmp.node_oid, symbol_oid : tmp.symbol_oid } - } + } } pub fn getSymbolOid(self) -> int { @@ -500,12 +500,12 @@ impl ShorthandAssignmentValueSymbolDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *ShorthandAssignmentValueSymbolDO { - for (tmp in db.shorthand_assignment_value_symbol) { + for (tmp in db.shorthand_assignment_value_symbol) { yield ShorthandAssignmentValueSymbolDO { node_oid : tmp.node_oid, symbol_oid : tmp.symbol_oid } - } + } } pub fn getSymbolOid(self) -> int { @@ -522,12 +522,12 @@ impl CallSiteDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *CallSiteDO { - for (tmp in db.call_site) { + for (tmp in db.call_site) { yield CallSiteDO { invoke_expression_oid : tmp.invoke_expression_oid, callee_oid : tmp.callee_oid } - } + } } pub fn getCalleeOid(self) -> int { @@ -544,12 +544,12 @@ impl CfgEntryNodeDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *CfgEntryNodeDO { - for (tmp in db.cfg_entry_node) { + for (tmp in db.cfg_entry_node) { yield CfgEntryNodeDO { oid : tmp.oid, ast_node_oid : tmp.ast_node_oid } - } + } } pub fn getAstNodeOid(self) -> int { @@ -566,12 +566,12 @@ impl CfgExitNodeDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *CfgExitNodeDO { - for (tmp in db.cfg_exit_node) { + for (tmp in db.cfg_exit_node) { yield CfgExitNodeDO { oid : tmp.oid, ast_node_oid : tmp.ast_node_oid } - } + } } pub fn getAstNodeOid(self) -> int { @@ -589,13 +589,13 @@ impl CommentDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *CommentDO { - for (tmp in db.comment) { + for (tmp in db.comment) { yield CommentDO { oid : tmp.oid, kind : tmp.kind, location_oid : tmp.location_oid } - } + } } pub fn getKind(self) -> int { @@ -618,14 +618,14 @@ impl NodeCommentDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *NodeCommentDO { - for (tmp in db.node_comment) { + for (tmp in db.node_comment) { yield NodeCommentDO { oid : tmp.oid, node_oid : tmp.node_oid, comment_oid : tmp.comment_oid, type : tmp.type } - } + } } pub fn getNodeOid(self) -> int { @@ -651,13 +651,13 @@ impl JsParseErrorDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *JsParseErrorDO { - for (tmp in db.js_parse_error) { + for (tmp in db.js_parse_error) { yield JsParseErrorDO { oid : tmp.oid, message : tmp.message, line : tmp.line } - } + } } pub fn getMessage(self) -> string { @@ -679,13 +679,13 @@ impl MetadataDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *MetadataDO { - for (tmp in db.metadata) { + for (tmp in db.metadata) { yield MetadataDO { oid : tmp.oid, version : tmp.version, created_time : tmp.created_time } - } + } } pub fn getVersion(self) -> string { @@ -708,14 +708,14 @@ impl IgnoredPathDO { @data_constraint @inline pub fn __all__(db: JavascriptDB) -> *IgnoredPathDO { - for (tmp in db.ignored_path) { + for (tmp in db.ignored_path) { yield IgnoredPathDO { oid : tmp.oid, path_kind : tmp.path_kind, path : tmp.path, ignore_kind : tmp.ignore_kind } - } + } } pub fn getPathKind(self) -> int { diff --git a/language/javascript/lib/DataFlowGraph.gdl b/language/javascript/lib/DataFlowGraph.gdl index 8d7600fc..e7d1d7a6 100644 --- a/language/javascript/lib/DataFlowGraph.gdl +++ b/language/javascript/lib/DataFlowGraph.gdl @@ -9,7 +9,7 @@ schema DataFlowNode extends Node { impl DataFlowNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DataFlowNode { + pub fn __all__(db: JavascriptDB) -> *DataFlowNode { for (tmp in Node(db)) { if (isDataFlowNode(tmp)) { yield DataFlowNode { diff --git a/language/javascript/lib/Declaration.gdl b/language/javascript/lib/Declaration.gdl index 1f699542..5a7354a4 100644 --- a/language/javascript/lib/Declaration.gdl +++ b/language/javascript/lib/Declaration.gdl @@ -12,7 +12,7 @@ schema TypeParameter extends Node { impl TypeParameter { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeParameter { + pub fn __all__(db: JavascriptDB) -> *TypeParameter { for (tmp in Node(db)) { if (isTypeParameter(tmp)) { yield TypeParameter { @@ -32,7 +32,7 @@ schema Parameter extends Node { impl Parameter { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Parameter { + pub fn __all__(db: JavascriptDB) -> *Parameter { for (tmp in Node(db)) { if (isParameter(tmp)) { yield Parameter { @@ -159,7 +159,7 @@ schema VariableDeclaration extends Node { impl VariableDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VariableDeclaration { + pub fn __all__(db: JavascriptDB) -> *VariableDeclaration { for (tmp in Node(db)) { if (isVariableDeclaration(tmp)) { yield VariableDeclaration { @@ -342,7 +342,7 @@ schema VariableDeclarationList extends Node { impl VariableDeclarationList { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VariableDeclarationList { + pub fn __all__(db: JavascriptDB) -> *VariableDeclarationList { for (tmp in Node(db)) { if (isVariableDeclarationList(tmp)) { yield VariableDeclarationList { @@ -397,7 +397,7 @@ schema BindingElement extends Node { impl BindingElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BindingElement { + pub fn __all__(db: JavascriptDB) -> *BindingElement { for (tmp in Node(db)) { if (isBindingElement(tmp)) { yield BindingElement { @@ -533,7 +533,7 @@ schema ArrayBindingElement extends Node { impl ArrayBindingElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ArrayBindingElement { + pub fn __all__(db: JavascriptDB) -> *ArrayBindingElement { for (tmp in Node(db)) { if (isArrayBindingElement(tmp)) { yield ArrayBindingElement { @@ -553,7 +553,7 @@ schema BindingPattern extends Node { impl BindingPattern { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BindingPattern { + pub fn __all__(db: JavascriptDB) -> *BindingPattern { for (tmp in Node(db)) { if (isBindingPattern(tmp)) { yield BindingPattern { @@ -591,7 +591,7 @@ schema BindingName extends Node { impl BindingName { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BindingName { + pub fn __all__(db: JavascriptDB) -> *BindingName { for (tmp in Node(db)) { if (isBindingName(tmp)) { yield BindingName { @@ -621,7 +621,7 @@ schema ObjectBindingPattern extends BindingPattern { impl ObjectBindingPattern { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ObjectBindingPattern { + pub fn __all__(db: JavascriptDB) -> *ObjectBindingPattern { for (tmp in BindingPattern(db)) { if (isObjectBindingPattern(Node {id: tmp.id})) { yield ObjectBindingPattern { @@ -688,7 +688,7 @@ schema ArrayBindingPattern extends BindingPattern { impl ArrayBindingPattern { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ArrayBindingPattern { + pub fn __all__(db: JavascriptDB) -> *ArrayBindingPattern { for (tmp in BindingPattern(db)) { if (isArrayBindingPattern(Node {id: tmp.id})) { yield ArrayBindingPattern { @@ -739,7 +739,7 @@ schema EnumMember extends Node { impl EnumMember { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EnumMember { + pub fn __all__(db: JavascriptDB) -> *EnumMember { for (tmp in Node(db)) { if (isEnumMember(tmp)) { yield EnumMember { diff --git a/language/javascript/lib/DefUse.gdl b/language/javascript/lib/DefUse.gdl index ff67131b..75909f08 100644 --- a/language/javascript/lib/DefUse.gdl +++ b/language/javascript/lib/DefUse.gdl @@ -9,7 +9,7 @@ schema VarRef extends BindingName { impl VarRef { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VarRef { + pub fn __all__(db: JavascriptDB) -> *VarRef { for (tmp in BindingName(db)) { yield VarRef { id : tmp.id @@ -29,7 +29,7 @@ schema RefExpr extends Node { impl RefExpr { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RefExpr { + pub fn __all__(db: JavascriptDB) -> *RefExpr { for (tmp in Node(db)) { for (varRef in VarRef(db)) { if (tmp.key_eq(varRef)) { @@ -95,7 +95,7 @@ schema LValue extends RefExpr { impl LValue { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LValue { + pub fn __all__(db: JavascriptDB) -> *LValue { for (tmp in RefExpr(db)) { if (isLValue(tmp)) { yield LValue { @@ -139,7 +139,7 @@ schema RValue extends RefExpr { impl RValue { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RValue { + pub fn __all__(db: JavascriptDB) -> *RValue { for (tmp in RefExpr(db)) { if (isRValue(tmp)) { yield RValue { @@ -159,7 +159,7 @@ schema VarUse extends ControlFlowNode { impl VarUse { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VarUse { + pub fn __all__(db: JavascriptDB) -> *VarUse { for (controlFlowNode in ControlFlowNode(db)) { if (isRValue(controlFlowNode.to())) { yield VarUse { @@ -275,7 +275,7 @@ schema VarDef extends ControlFlowNode { impl VarDef { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VarDef { + pub fn __all__(db: JavascriptDB) -> *VarDef { for (tmp in ControlFlowNode(db)) { if (defn(tmp, __all_data__)) { yield VarDef { diff --git a/language/javascript/lib/Expression.gdl b/language/javascript/lib/Expression.gdl index bc7b59ad..ea1e6600 100644 --- a/language/javascript/lib/Expression.gdl +++ b/language/javascript/lib/Expression.gdl @@ -12,7 +12,7 @@ schema Expression extends Node { impl Expression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Expression { + pub fn __all__(db: JavascriptDB) -> *Expression { for (tmp in Node(db)) { if (isExpression(tmp)) { yield Expression { @@ -32,7 +32,7 @@ schema ArrowFunctionExpression extends Expression { impl ArrowFunctionExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ArrowFunctionExpression { + pub fn __all__(db: JavascriptDB) -> *ArrowFunctionExpression { for (tmp in Expression(db)) { if (isArrowFunction(Node {id: tmp.id})) { yield ArrowFunctionExpression { @@ -52,7 +52,7 @@ schema BinaryExpression extends Expression { impl BinaryExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BinaryExpression { + pub fn __all__(db: JavascriptDB) -> *BinaryExpression { for (tmp in Expression(db)) { if (isBinaryExpression(Node {id: tmp.id})) { yield BinaryExpression { @@ -137,7 +137,7 @@ schema ExponentiationExpression extends BinaryExpression { impl ExponentiationExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExponentiationExpression { + pub fn __all__(db: JavascriptDB) -> *ExponentiationExpression { for (tmp in BinaryExpression(db)) { if (isExponentiationExpression(Node {id: tmp.id})) { yield ExponentiationExpression { @@ -157,7 +157,7 @@ schema MultiplicativeExpression extends BinaryExpression { impl MultiplicativeExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MultiplicativeExpression { + pub fn __all__(db: JavascriptDB) -> *MultiplicativeExpression { for (tmp in BinaryExpression(db)) { if (isMultiplicativeExpression(Node {id: tmp.id})) { yield MultiplicativeExpression { @@ -177,7 +177,7 @@ schema MultiplicationExpression extends MultiplicativeExpression { impl MultiplicationExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MultiplicationExpression { + pub fn __all__(db: JavascriptDB) -> *MultiplicationExpression { for (tmp in MultiplicativeExpression(db)) { if (isMultiplicationExpression(Node {id: tmp.id})) { yield MultiplicationExpression { @@ -197,7 +197,7 @@ schema DivisionExpression extends MultiplicativeExpression { impl DivisionExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DivisionExpression { + pub fn __all__(db: JavascriptDB) -> *DivisionExpression { for (tmp in MultiplicativeExpression(db)) { if (isDivisionExpression(Node {id: tmp.id})) { yield DivisionExpression { @@ -217,7 +217,7 @@ schema RemainderExpression extends MultiplicativeExpression { impl RemainderExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RemainderExpression { + pub fn __all__(db: JavascriptDB) -> *RemainderExpression { for (tmp in MultiplicativeExpression(db)) { if (isRemainderExpression(Node {id: tmp.id})) { yield RemainderExpression { @@ -237,7 +237,7 @@ schema AdditiveExpression extends BinaryExpression { impl AdditiveExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AdditiveExpression { + pub fn __all__(db: JavascriptDB) -> *AdditiveExpression { for (tmp in BinaryExpression(db)) { if (isAdditiveExpression(Node {id: tmp.id})) { yield AdditiveExpression { @@ -257,7 +257,7 @@ schema AdditionExpression extends AdditiveExpression { impl AdditionExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AdditionExpression { + pub fn __all__(db: JavascriptDB) -> *AdditionExpression { for (tmp in AdditiveExpression(db)) { if (isAdditionExpression(Node {id: tmp.id})) { yield AdditionExpression { @@ -277,7 +277,7 @@ schema SubtractionExpression extends AdditiveExpression { impl SubtractionExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SubtractionExpression { + pub fn __all__(db: JavascriptDB) -> *SubtractionExpression { for (tmp in AdditiveExpression(db)) { if (isSubtractionExpression(Node {id: tmp.id})) { yield SubtractionExpression { @@ -297,7 +297,7 @@ schema ShiftExpression extends BinaryExpression { impl ShiftExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ShiftExpression { + pub fn __all__(db: JavascriptDB) -> *ShiftExpression { for (tmp in BinaryExpression(db)) { if (isShiftExpression(Node {id: tmp.id})) { yield ShiftExpression { @@ -317,7 +317,7 @@ schema LeftShiftExpression extends ShiftExpression { impl LeftShiftExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LeftShiftExpression { + pub fn __all__(db: JavascriptDB) -> *LeftShiftExpression { for (tmp in ShiftExpression(db)) { if (isLeftShiftExpression(Node {id: tmp.id})) { yield LeftShiftExpression { @@ -337,7 +337,7 @@ schema RightShiftExpression extends ShiftExpression { impl RightShiftExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RightShiftExpression { + pub fn __all__(db: JavascriptDB) -> *RightShiftExpression { for (tmp in ShiftExpression(db)) { if (isRightShiftExpression(Node {id: tmp.id})) { yield RightShiftExpression { @@ -357,7 +357,7 @@ schema UnsignedRightShiftExpression extends ShiftExpression { impl UnsignedRightShiftExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnsignedRightShiftExpression { + pub fn __all__(db: JavascriptDB) -> *UnsignedRightShiftExpression { for (tmp in ShiftExpression(db)) { if (isUnsignedRightShiftExpression(Node {id: tmp.id})) { yield UnsignedRightShiftExpression { @@ -377,7 +377,7 @@ schema RelationalExpression extends BinaryExpression { impl RelationalExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RelationalExpression { + pub fn __all__(db: JavascriptDB) -> *RelationalExpression { for (tmp in BinaryExpression(db)) { if (isRelationalExpression(Node {id: tmp.id})) { yield RelationalExpression { @@ -397,7 +397,7 @@ schema LessThanExpression extends RelationalExpression { impl LessThanExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LessThanExpression { + pub fn __all__(db: JavascriptDB) -> *LessThanExpression { for (tmp in RelationalExpression(db)) { if (isLessThanExpression(Node {id: tmp.id})) { yield LessThanExpression { @@ -417,7 +417,7 @@ schema LessThanEqualsExpression extends RelationalExpression { impl LessThanEqualsExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LessThanEqualsExpression { + pub fn __all__(db: JavascriptDB) -> *LessThanEqualsExpression { for (tmp in RelationalExpression(db)) { if (isLessThanEqualsExpression(Node {id: tmp.id})) { yield LessThanEqualsExpression { @@ -437,7 +437,7 @@ schema GreaterThanExpression extends RelationalExpression { impl GreaterThanExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanExpression { + pub fn __all__(db: JavascriptDB) -> *GreaterThanExpression { for (tmp in RelationalExpression(db)) { if (isGreaterThanExpression(Node {id: tmp.id})) { yield GreaterThanExpression { @@ -457,7 +457,7 @@ schema GreaterThanEqualsExpression extends RelationalExpression { impl GreaterThanEqualsExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanEqualsExpression { + pub fn __all__(db: JavascriptDB) -> *GreaterThanEqualsExpression { for (tmp in RelationalExpression(db)) { if (isGreaterThanEqualsExpression(Node {id: tmp.id})) { yield GreaterThanEqualsExpression { @@ -477,7 +477,7 @@ schema InstanceOfExpression extends RelationalExpression { impl InstanceOfExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InstanceOfExpression { + pub fn __all__(db: JavascriptDB) -> *InstanceOfExpression { for (tmp in RelationalExpression(db)) { if (isInstanceOfExpression(Node {id: tmp.id})) { yield InstanceOfExpression { @@ -497,7 +497,7 @@ schema InExpression extends RelationalExpression { impl InExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InExpression { + pub fn __all__(db: JavascriptDB) -> *InExpression { for (tmp in RelationalExpression(db)) { if (isInExpression(Node {id: tmp.id})) { yield InExpression { @@ -517,7 +517,7 @@ schema EqualityTestExpression extends BinaryExpression { impl EqualityTestExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EqualityTestExpression { + pub fn __all__(db: JavascriptDB) -> *EqualityTestExpression { for (tmp in BinaryExpression(db)) { if (isEqualityTestExpression(Node {id: tmp.id})) { yield EqualityTestExpression { @@ -537,7 +537,7 @@ schema EqualityExpression extends EqualityTestExpression { impl EqualityExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EqualityExpression { + pub fn __all__(db: JavascriptDB) -> *EqualityExpression { for (tmp in EqualityTestExpression(db)) { if (isEqualityExpression(Node {id: tmp.id})) { yield EqualityExpression { @@ -557,7 +557,7 @@ schema InequalityExpression extends EqualityTestExpression { impl InequalityExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InequalityExpression { + pub fn __all__(db: JavascriptDB) -> *InequalityExpression { for (tmp in EqualityTestExpression(db)) { if (isInequalityExpression(Node {id: tmp.id})) { yield InequalityExpression { @@ -577,7 +577,7 @@ schema StrictEqualityExpression extends EqualityTestExpression { impl StrictEqualityExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StrictEqualityExpression { + pub fn __all__(db: JavascriptDB) -> *StrictEqualityExpression { for (tmp in EqualityTestExpression(db)) { if (isStrictEqualityExpression(Node {id: tmp.id})) { yield StrictEqualityExpression { @@ -597,7 +597,7 @@ schema StrictInequalityExpression extends EqualityTestExpression { impl StrictInequalityExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StrictInequalityExpression { + pub fn __all__(db: JavascriptDB) -> *StrictInequalityExpression { for (tmp in EqualityTestExpression(db)) { if (isStrictInequalityExpression(Node {id: tmp.id})) { yield StrictInequalityExpression { @@ -617,7 +617,7 @@ schema StrictEqualityTestExpression extends EqualityTestExpression { impl StrictEqualityTestExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StrictEqualityTestExpression { + pub fn __all__(db: JavascriptDB) -> *StrictEqualityTestExpression { for (tmp in EqualityTestExpression(db)) { if (isStrictEqualityTestExpression(Node {id: tmp.id})) { yield StrictEqualityTestExpression { @@ -637,7 +637,7 @@ schema NonStrictEqualityTestExpression extends EqualityTestExpression { impl NonStrictEqualityTestExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NonStrictEqualityTestExpression { + pub fn __all__(db: JavascriptDB) -> *NonStrictEqualityTestExpression { for (tmp in EqualityTestExpression(db)) { if (isNonStrictEqualityTestExpression(Node {id: tmp.id})) { yield NonStrictEqualityTestExpression { @@ -657,7 +657,7 @@ schema BinaryBitwiseExpression extends BinaryExpression { impl BinaryBitwiseExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BinaryBitwiseExpression { + pub fn __all__(db: JavascriptDB) -> *BinaryBitwiseExpression { for (tmp in BinaryExpression(db)) { if (isBinaryBitwiseExpression(Node {id: tmp.id})) { yield BinaryBitwiseExpression { @@ -677,7 +677,7 @@ schema BitwiseAndExpression extends BinaryBitwiseExpression { impl BitwiseAndExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseAndExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseAndExpression { for (tmp in BinaryBitwiseExpression(db)) { if (isBitwiseAndExpression(Node {id: tmp.id})) { yield BitwiseAndExpression { @@ -697,7 +697,7 @@ schema BitwiseOrExpression extends BinaryBitwiseExpression { impl BitwiseOrExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseOrExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseOrExpression { for (tmp in BinaryBitwiseExpression(db)) { if (isBitwiseOrExpression(Node {id: tmp.id})) { yield BitwiseOrExpression { @@ -717,7 +717,7 @@ schema BitwiseXorExpression extends BinaryBitwiseExpression { impl BitwiseXorExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseXorExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseXorExpression { for (tmp in BinaryBitwiseExpression(db)) { if (isBitwiseXorExpression(Node {id: tmp.id})) { yield BitwiseXorExpression { @@ -734,7 +734,7 @@ schema BinaryLogicalExpression extends BinaryExpression { impl BinaryLogicalExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BinaryLogicalExpression { + pub fn __all__(db: JavascriptDB) -> *BinaryLogicalExpression { for (tmp in BinaryExpression(db)) { if (isBinaryLogicalExpression(Node {id: tmp.id})) { yield BinaryLogicalExpression { @@ -754,7 +754,7 @@ schema LogicalAndExpression extends BinaryLogicalExpression { impl LogicalAndExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LogicalAndExpression { + pub fn __all__(db: JavascriptDB) -> *LogicalAndExpression { for (tmp in BinaryLogicalExpression(db)) { if (isLogicalAndExpression(Node {id: tmp.id})) { yield LogicalAndExpression { @@ -774,7 +774,7 @@ schema LogicalOrExpression extends BinaryLogicalExpression { impl LogicalOrExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LogicalOrExpression { + pub fn __all__(db: JavascriptDB) -> *LogicalOrExpression { for (tmp in BinaryLogicalExpression(db)) { if (isLogicalOrExpression(Node {id: tmp.id})) { yield LogicalOrExpression { @@ -794,7 +794,7 @@ schema NullishCoalescingExpression extends BinaryLogicalExpression { impl NullishCoalescingExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NullishCoalescingExpression { + pub fn __all__(db: JavascriptDB) -> *NullishCoalescingExpression { for (tmp in BinaryLogicalExpression(db)) { if (isNullishCoalescingExpression(Node {id: tmp.id})) { yield NullishCoalescingExpression { @@ -814,7 +814,7 @@ schema AssignmentExpression extends BinaryExpression { impl AssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *AssignmentExpression { for (tmp in BinaryExpression(db)) { if (isAssignmentExpression(Node {id: tmp.id})) { yield AssignmentExpression { @@ -834,7 +834,7 @@ schema SimpleAssignmentExpression extends AssignmentExpression { impl SimpleAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SimpleAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *SimpleAssignmentExpression { for (tmp in AssignmentExpression(db)) { if (isSimpleAssignmentExpression(Node {id: tmp.id})) { yield SimpleAssignmentExpression { @@ -856,7 +856,7 @@ schema CompoundAssignmentExpression extends AssignmentExpression { impl CompoundAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CompoundAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *CompoundAssignmentExpression { for (tmp in AssignmentExpression(db)) { if (isCompoundAssignmentExpression(Node {id: tmp.id})) { yield CompoundAssignmentExpression { @@ -876,7 +876,7 @@ schema AdditionAssignmentExpression extends CompoundAssignmentExpression { impl AdditionAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AdditionAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *AdditionAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isAdditionAssignmentExpression(Node {id: tmp.id})) { yield AdditionAssignmentExpression { @@ -896,7 +896,7 @@ schema SubtractionAssignmentExpression extends CompoundAssignmentExpression { impl SubtractionAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SubtractionAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *SubtractionAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isSubtractionAssignmentExpression(Node {id: tmp.id})) { yield SubtractionAssignmentExpression { @@ -916,7 +916,7 @@ schema ExponentiationAssignmentExpression extends CompoundAssignmentExpression { impl ExponentiationAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExponentiationAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *ExponentiationAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isExponentiationAssignmentExpression(Node {id: tmp.id})) { yield ExponentiationAssignmentExpression { @@ -936,7 +936,7 @@ schema MultiplicationAssignmentExpression extends CompoundAssignmentExpression { impl MultiplicationAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MultiplicationAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *MultiplicationAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isMultiplicationAssignmentExpression(Node {id: tmp.id})) { yield MultiplicationAssignmentExpression { @@ -956,7 +956,7 @@ schema DivisionAssignmentExpression extends CompoundAssignmentExpression { impl DivisionAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DivisionAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *DivisionAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isDivisionAssignmentExpression(Node {id: tmp.id})) { yield DivisionAssignmentExpression { @@ -976,7 +976,7 @@ schema RemainderAssignmentExpression extends CompoundAssignmentExpression { impl RemainderAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RemainderAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *RemainderAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isRemainderAssignmentExpression(Node {id: tmp.id})) { yield RemainderAssignmentExpression { @@ -996,7 +996,7 @@ schema BitwiseAndAssignmentExpression extends CompoundAssignmentExpression { impl BitwiseAndAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseAndAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseAndAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isBitwiseAndAssignmentExpression(Node {id: tmp.id})) { yield BitwiseAndAssignmentExpression { @@ -1016,7 +1016,7 @@ schema BitwiseOrAssignmentExpression extends CompoundAssignmentExpression { impl BitwiseOrAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseOrAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseOrAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isBitwiseOrAssignmentExpression(Node {id: tmp.id})) { yield BitwiseOrAssignmentExpression { @@ -1036,7 +1036,7 @@ schema BitwiseXorAssignmentExpression extends CompoundAssignmentExpression { impl BitwiseXorAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseXorAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseXorAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isBitwiseXorAssignmentExpression(Node {id: tmp.id})) { yield BitwiseXorAssignmentExpression { @@ -1056,7 +1056,7 @@ schema LeftShiftAssignmentExpression extends CompoundAssignmentExpression { impl LeftShiftAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LeftShiftAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *LeftShiftAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isLeftShiftAssignmentExpression(Node {id: tmp.id})) { yield LeftShiftAssignmentExpression { @@ -1076,7 +1076,7 @@ schema RightShiftAssignmentExpression extends CompoundAssignmentExpression { impl RightShiftAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RightShiftAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *RightShiftAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isRightShiftAssignmentExpression(Node {id: tmp.id})) { yield RightShiftAssignmentExpression { @@ -1096,7 +1096,7 @@ schema UnsignedRightShiftAssignmentExpression extends CompoundAssignmentExpressi impl UnsignedRightShiftAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnsignedRightShiftAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *UnsignedRightShiftAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isUnsignedRightShiftAssignmentExpression(Node {id: tmp.id})) { yield UnsignedRightShiftAssignmentExpression { @@ -1116,7 +1116,7 @@ schema LogicalAndAssignmentExpression extends CompoundAssignmentExpression { impl LogicalAndAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LogicalAndAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *LogicalAndAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isLogicalAndAssignmentExpression(Node {id: tmp.id})) { yield LogicalAndAssignmentExpression { @@ -1136,7 +1136,7 @@ schema LogicalOrAssignmentExpression extends CompoundAssignmentExpression { impl LogicalOrAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LogicalOrAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *LogicalOrAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isLogicalOrAssignmentExpression(Node {id: tmp.id})) { yield LogicalOrAssignmentExpression { @@ -1156,7 +1156,7 @@ schema NullishAssignmentExpression extends CompoundAssignmentExpression { impl NullishAssignmentExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NullishAssignmentExpression { + pub fn __all__(db: JavascriptDB) -> *NullishAssignmentExpression { for (tmp in CompoundAssignmentExpression(db)) { if (isNullishAssignmentExpression(Node {id: tmp.id})) { yield NullishAssignmentExpression { @@ -1176,7 +1176,7 @@ schema CommaExpression extends BinaryExpression { impl CommaExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CommaExpression { + pub fn __all__(db: JavascriptDB) -> *CommaExpression { for (tmp in BinaryExpression(db)) { if (isCommaExpression(Node {id: tmp.id})) { yield CommaExpression { @@ -1196,7 +1196,7 @@ schema ConditionalExpression extends Expression { impl ConditionalExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConditionalExpression { + pub fn __all__(db: JavascriptDB) -> *ConditionalExpression { for (tmp in Expression(db)) { if (isConditionalExpression(Node {id: tmp.id})) { yield ConditionalExpression { @@ -1245,7 +1245,7 @@ schema YieldExpression extends Expression { impl YieldExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *YieldExpression { + pub fn __all__(db: JavascriptDB) -> *YieldExpression { for (tmp in Expression(db)) { if (isYieldExpression(Node {id: tmp.id})) { yield YieldExpression { @@ -1288,7 +1288,7 @@ schema SpreadElement extends Expression { impl SpreadElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SpreadElement { + pub fn __all__(db: JavascriptDB) -> *SpreadElement { for (tmp in Expression(db)) { if (isSpreadElement(Node {id: tmp.id})) { yield SpreadElement { @@ -1316,7 +1316,7 @@ schema OmittedExpression extends Expression { impl OmittedExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *OmittedExpression { + pub fn __all__(db: JavascriptDB) -> *OmittedExpression { for (tmp in Expression(db)) { if (isOmittedExpression(Node {id: tmp.id})) { yield OmittedExpression { @@ -1336,7 +1336,7 @@ schema AsExpression extends Expression { impl AsExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AsExpression { + pub fn __all__(db: JavascriptDB) -> *AsExpression { for (tmp in Expression(db)) { if (isAsExpression(Node {id: tmp.id})) { yield AsExpression { @@ -1372,7 +1372,7 @@ schema SyntheticExpression extends Expression { impl SyntheticExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SyntheticExpression { + pub fn __all__(db: JavascriptDB) -> *SyntheticExpression { for (tmp in Expression(db)) { if (isSyntheticExpression(Node {id: tmp.id})) { yield SyntheticExpression { @@ -1393,7 +1393,7 @@ schema CommaListExpression extends Expression { impl CommaListExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CommaListExpression { + pub fn __all__(db: JavascriptDB) -> *CommaListExpression { for (tmp in Expression(db)) { if (isCommaListExpression(Node {id: tmp.id})) { yield CommaListExpression { @@ -1444,7 +1444,7 @@ schema UnaryExpression extends Expression { impl UnaryExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnaryExpression { + pub fn __all__(db: JavascriptDB) -> *UnaryExpression { for (tmp in Expression(db)) { if (isUnaryExpression(Node {id: tmp.id})) { yield UnaryExpression { @@ -1472,7 +1472,7 @@ schema TypeAssertionExpression extends UnaryExpression { impl TypeAssertionExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeAssertionExpression { + pub fn __all__(db: JavascriptDB) -> *TypeAssertionExpression { for (tmp in UnaryExpression(db)) { if (isTypeAssertionExpression(Node {id: tmp.id})) { yield TypeAssertionExpression { @@ -1508,7 +1508,7 @@ schema DeleteExpression extends UnaryExpression { impl DeleteExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DeleteExpression { + pub fn __all__(db: JavascriptDB) -> *DeleteExpression { for (tmp in UnaryExpression(db)) { if (isDeleteExpression(Node {id: tmp.id})) { yield DeleteExpression { @@ -1536,7 +1536,7 @@ schema TypeOfExpression extends UnaryExpression { impl TypeOfExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeOfExpression { + pub fn __all__(db: JavascriptDB) -> *TypeOfExpression { for (tmp in UnaryExpression(db)) { if (isTypeOfExpression(Node {id: tmp.id})) { yield TypeOfExpression { @@ -1564,7 +1564,7 @@ schema VoidExpression extends UnaryExpression { impl VoidExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VoidExpression { + pub fn __all__(db: JavascriptDB) -> *VoidExpression { for (tmp in UnaryExpression(db)) { if (isVoidExpression(Node {id: tmp.id})) { yield VoidExpression { @@ -1592,7 +1592,7 @@ schema AwaitExpression extends UnaryExpression { impl AwaitExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AwaitExpression { + pub fn __all__(db: JavascriptDB) -> *AwaitExpression { for (tmp in UnaryExpression(db)) { if (isAwaitExpression(Node {id: tmp.id})) { yield AwaitExpression { @@ -1620,7 +1620,7 @@ schema UpdateExpression extends UnaryExpression { impl UpdateExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UpdateExpression { + pub fn __all__(db: JavascriptDB) -> *UpdateExpression { for (tmp in UnaryExpression(db)) { if (isUpdateExpression(Node {id: tmp.id})) { yield UpdateExpression { @@ -1640,7 +1640,7 @@ schema LeftHandSideExpression extends UpdateExpression { impl LeftHandSideExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LeftHandSideExpression { + pub fn __all__(db: JavascriptDB) -> *LeftHandSideExpression { for (tmp in UpdateExpression(db)) { if (isLeftHandSideExpression(Node {id: tmp.id})) { yield LeftHandSideExpression { @@ -1660,7 +1660,7 @@ schema PrefixUnaryExpression extends UpdateExpression { impl PrefixUnaryExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrefixUnaryExpression { + pub fn __all__(db: JavascriptDB) -> *PrefixUnaryExpression { for (tmp in UpdateExpression(db)) { if (isPrefixUnaryExpression(Node {id: tmp.id})) { yield PrefixUnaryExpression { @@ -1696,7 +1696,7 @@ schema PrefixIncrementExpression extends PrefixUnaryExpression { impl PrefixIncrementExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrefixIncrementExpression { + pub fn __all__(db: JavascriptDB) -> *PrefixIncrementExpression { for (tmp in PrefixUnaryExpression(db)) { if (isPrefixIncrementExpression(Node {id: tmp.id})) { yield PrefixIncrementExpression { @@ -1716,7 +1716,7 @@ schema PrefixDecrementExpression extends PrefixUnaryExpression { impl PrefixDecrementExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrefixDecrementExpression { + pub fn __all__(db: JavascriptDB) -> *PrefixDecrementExpression { for (tmp in PrefixUnaryExpression(db)) { if (isPrefixDecrementExpression(Node {id: tmp.id})) { yield PrefixDecrementExpression { @@ -1736,7 +1736,7 @@ schema UnaryPlusExpression extends PrefixUnaryExpression { impl UnaryPlusExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnaryPlusExpression { + pub fn __all__(db: JavascriptDB) -> *UnaryPlusExpression { for (tmp in PrefixUnaryExpression(db)) { if (isUnaryPlusExpression(Node {id: tmp.id})) { yield UnaryPlusExpression { @@ -1756,7 +1756,7 @@ schema UnaryMinusExpression extends PrefixUnaryExpression { impl UnaryMinusExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnaryMinusExpression { + pub fn __all__(db: JavascriptDB) -> *UnaryMinusExpression { for (tmp in PrefixUnaryExpression(db)) { if (isUnaryMinusExpression(Node {id: tmp.id})) { yield UnaryMinusExpression { @@ -1776,7 +1776,7 @@ schema BitwiseNotExpression extends PrefixUnaryExpression { impl BitwiseNotExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BitwiseNotExpression { + pub fn __all__(db: JavascriptDB) -> *BitwiseNotExpression { for (tmp in PrefixUnaryExpression(db)) { if (isBitwiseNotExpression(Node {id: tmp.id})) { yield BitwiseNotExpression { @@ -1796,7 +1796,7 @@ schema LogicalNotExpression extends PrefixUnaryExpression { impl LogicalNotExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LogicalNotExpression { + pub fn __all__(db: JavascriptDB) -> *LogicalNotExpression { for (tmp in PrefixUnaryExpression(db)) { if (isLogicalNotExpression(Node {id: tmp.id})) { yield LogicalNotExpression { @@ -1816,7 +1816,7 @@ schema PostfixUnaryExpression extends UpdateExpression { impl PostfixUnaryExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PostfixUnaryExpression { + pub fn __all__(db: JavascriptDB) -> *PostfixUnaryExpression { for (tmp in UpdateExpression(db)) { if (isPostfixUnaryExpression(Node {id: tmp.id})) { yield PostfixUnaryExpression { @@ -1852,7 +1852,7 @@ schema PostfixIncrementExpression extends PostfixUnaryExpression { impl PostfixIncrementExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PostfixIncrementExpression { + pub fn __all__(db: JavascriptDB) -> *PostfixIncrementExpression { for (tmp in PostfixUnaryExpression(db)) { if (isPostfixIncrementExpression(Node {id: tmp.id})) { yield PostfixIncrementExpression { @@ -1872,7 +1872,7 @@ schema PostfixDecrementExpression extends PostfixUnaryExpression { impl PostfixDecrementExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PostfixDecrementExpression { + pub fn __all__(db: JavascriptDB) -> *PostfixDecrementExpression { for (tmp in PostfixUnaryExpression(db)) { if (isPostfixDecrementExpression(Node {id: tmp.id})) { yield PostfixDecrementExpression { @@ -1892,7 +1892,7 @@ schema IncrementExpression extends UpdateExpression { impl IncrementExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IncrementExpression { + pub fn __all__(db: JavascriptDB) -> *IncrementExpression { for (tmp in UpdateExpression(db)) { if (isIncrementExpression(Node {id: tmp.id})) { yield IncrementExpression { @@ -1912,7 +1912,7 @@ schema DecrementExpression extends UpdateExpression { impl DecrementExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DecrementExpression { + pub fn __all__(db: JavascriptDB) -> *DecrementExpression { for (tmp in UpdateExpression(db)) { if (isDecrementExpression(Node {id: tmp.id})) { yield DecrementExpression { @@ -1932,7 +1932,7 @@ schema CallExpression extends LeftHandSideExpression { impl CallExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CallExpression { + pub fn __all__(db: JavascriptDB) -> *CallExpression { for (tmp in LeftHandSideExpression(db)) { if (isCallExpression(Node {id: tmp.id})) { yield CallExpression { @@ -2103,7 +2103,7 @@ schema NonNullExpression extends LeftHandSideExpression { impl NonNullExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NonNullExpression { + pub fn __all__(db: JavascriptDB) -> *NonNullExpression { for (tmp in LeftHandSideExpression(db)) { if (isNonNullExpression(Node {id: tmp.id})) { yield NonNullExpression { @@ -2132,7 +2132,7 @@ schema PartiallyEmittedExpression extends LeftHandSideExpression { impl PartiallyEmittedExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PartiallyEmittedExpression { + pub fn __all__(db: JavascriptDB) -> *PartiallyEmittedExpression { for (tmp in LeftHandSideExpression(db)) { if (isPartiallyEmittedExpression(Node {id: tmp.id})) { yield PartiallyEmittedExpression { @@ -2161,7 +2161,7 @@ schema SyntheticReferenceExpression extends LeftHandSideExpression { impl SyntheticReferenceExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SyntheticReferenceExpression { + pub fn __all__(db: JavascriptDB) -> *SyntheticReferenceExpression { for (tmp in LeftHandSideExpression(db)) { if (isSyntheticReferenceExpression(Node {id: tmp.id})) { yield SyntheticReferenceExpression { @@ -2181,7 +2181,7 @@ schema MemberExpression extends LeftHandSideExpression { impl MemberExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MemberExpression { + pub fn __all__(db: JavascriptDB) -> *MemberExpression { for (tmp in LeftHandSideExpression(db)) { if (isMemberExpression(Node {id: tmp.id})) { yield MemberExpression { @@ -2201,7 +2201,7 @@ schema MemberName extends Node { impl MemberName { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MemberName { + pub fn __all__(db: JavascriptDB) -> *MemberName { for (tmp in Node(db)) { if (isMemberName(tmp)) { yield MemberName { @@ -2234,7 +2234,7 @@ schema AccessExpression extends MemberExpression { impl AccessExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AccessExpression { + pub fn __all__(db: JavascriptDB) -> *AccessExpression { for (tmp in MemberExpression(db)) { if (isAccessExpression(Node {id: tmp.id})) { yield AccessExpression { @@ -2331,7 +2331,7 @@ schema PropertyAccessExpression extends AccessExpression { impl PropertyAccessExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PropertyAccessExpression { + pub fn __all__(db: JavascriptDB) -> *PropertyAccessExpression { for (tmp in AccessExpression(db)) { if (isPropertyAccessExpression(Node {id: tmp.id})) { yield PropertyAccessExpression { @@ -2371,7 +2371,7 @@ schema ElementAccessExpression extends AccessExpression { impl ElementAccessExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ElementAccessExpression { + pub fn __all__(db: JavascriptDB) -> *ElementAccessExpression { for (tmp in AccessExpression(db)) { if (isElementAccessExpression(Node {id: tmp.id})) { yield ElementAccessExpression { @@ -2411,7 +2411,7 @@ schema TaggedTemplateExpression extends MemberExpression { impl TaggedTemplateExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TaggedTemplateExpression { + pub fn __all__(db: JavascriptDB) -> *TaggedTemplateExpression { for (tmp in MemberExpression(db)) { if (isTaggedTemplateExpression(Node {id: tmp.id})) { yield TaggedTemplateExpression { @@ -2452,7 +2452,7 @@ schema PrimaryExpression extends MemberExpression { impl PrimaryExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrimaryExpression { + pub fn __all__(db: JavascriptDB) -> *PrimaryExpression { for (tmp in MemberExpression(db)) { if (isPrimaryExpression(Node {id: tmp.id})) { yield PrimaryExpression { @@ -2472,7 +2472,7 @@ schema Identifier extends PrimaryExpression { impl Identifier { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Identifier { + pub fn __all__(db: JavascriptDB) -> *Identifier { for (tmp in PrimaryExpression(db)) { if (isIdentifier(Node {id: tmp.id})) { yield Identifier { @@ -2496,7 +2496,7 @@ schema PrivateIdentifier extends PrimaryExpression { impl PrivateIdentifier { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrivateIdentifier { + pub fn __all__(db: JavascriptDB) -> *PrivateIdentifier { for (tmp in PrimaryExpression(db)) { if (isPrivateIdentifier(Node {id: tmp.id})) { yield PrivateIdentifier { @@ -2520,7 +2520,7 @@ schema ThisExpression extends PrimaryExpression { impl ThisExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ThisExpression { + pub fn __all__(db: JavascriptDB) -> *ThisExpression { for (tmp in PrimaryExpression(db)) { if (isThisExpression(Node {id: tmp.id})) { yield ThisExpression { @@ -2540,7 +2540,7 @@ schema SuperExpression extends PrimaryExpression { impl SuperExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SuperExpression { + pub fn __all__(db: JavascriptDB) -> *SuperExpression { for (tmp in PrimaryExpression(db)) { if (isSuperExpression(Node {id: tmp.id})) { yield SuperExpression { @@ -2560,7 +2560,7 @@ schema ImportExpression extends PrimaryExpression { impl ImportExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportExpression { + pub fn __all__(db: JavascriptDB) -> *ImportExpression { for (tmp in PrimaryExpression(db)) { if (isImportExpression(Node {id: tmp.id})) { yield ImportExpression { @@ -2580,7 +2580,7 @@ schema ArrayLiteralExpression extends PrimaryExpression { impl ArrayLiteralExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ArrayLiteralExpression { + pub fn __all__(db: JavascriptDB) -> *ArrayLiteralExpression { for (tmp in PrimaryExpression(db)) { if (isArrayLiteralExpression(Node {id: tmp.id})) { yield ArrayLiteralExpression { @@ -2618,7 +2618,7 @@ schema NewExpression extends PrimaryExpression { impl NewExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NewExpression { + pub fn __all__(db: JavascriptDB) -> *NewExpression { for (tmp in PrimaryExpression(db)) { if (isNewExpression(Node {id: tmp.id})) { yield NewExpression { @@ -2740,7 +2740,7 @@ schema ParenthesizedExpression extends PrimaryExpression { impl ParenthesizedExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ParenthesizedExpression { + pub fn __all__(db: JavascriptDB) -> *ParenthesizedExpression { for (tmp in PrimaryExpression(db)) { if (isParenthesizedExpression(Node {id: tmp.id})) { yield ParenthesizedExpression { @@ -2768,7 +2768,7 @@ schema FunctionExpression extends PrimaryExpression { impl FunctionExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionExpression { + pub fn __all__(db: JavascriptDB) -> *FunctionExpression { for (tmp in PrimaryExpression(db)) { if (isFunctionExpression(Node {id: tmp.id})) { yield FunctionExpression { @@ -2818,7 +2818,7 @@ schema TemplateExpression extends PrimaryExpression { impl TemplateExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateExpression { + pub fn __all__(db: JavascriptDB) -> *TemplateExpression { for (tmp in PrimaryExpression(db)) { if (isTemplateExpression(Node {id: tmp.id})) { yield TemplateExpression { @@ -2868,7 +2868,7 @@ schema ClassExpression extends PrimaryExpression { impl ClassExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassExpression { + pub fn __all__(db: JavascriptDB) -> *ClassExpression { for (tmp in PrimaryExpression(db)) { if (isClassExpression(Node {id: tmp.id})) { yield ClassExpression { @@ -2888,7 +2888,7 @@ schema MetaProperty extends PrimaryExpression { impl MetaProperty { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MetaProperty { + pub fn __all__(db: JavascriptDB) -> *MetaProperty { for (tmp in PrimaryExpression(db)) { if (isMetaProperty(Node {id: tmp.id})) { yield MetaProperty { @@ -2924,7 +2924,7 @@ schema LiteralExpression extends PrimaryExpression { impl LiteralExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LiteralExpression { + pub fn __all__(db: JavascriptDB) -> *LiteralExpression { for (tmp in PrimaryExpression(db)) { if (isLiteralExpression(Node {id: tmp.id})) { yield LiteralExpression { @@ -2957,7 +2957,7 @@ schema NullLiteral extends PrimaryExpression { impl NullLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NullLiteral { + pub fn __all__(db: JavascriptDB) -> *NullLiteral { for (tmp in PrimaryExpression(db)) { if (isNullLiteral(Node {id: tmp.id})) { yield NullLiteral { @@ -2977,7 +2977,7 @@ schema TrueLiteral extends PrimaryExpression { impl TrueLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TrueLiteral { + pub fn __all__(db: JavascriptDB) -> *TrueLiteral { for (tmp in PrimaryExpression(db)) { if (isTrueKeyword(Node {id: tmp.id})) { yield TrueLiteral { @@ -2997,7 +2997,7 @@ schema FalseLiteral extends PrimaryExpression { impl FalseLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FalseLiteral { + pub fn __all__(db: JavascriptDB) -> *FalseLiteral { for (tmp in PrimaryExpression(db)) { if (isFalseKeyword(Node {id: tmp.id})) { yield FalseLiteral { @@ -3017,7 +3017,7 @@ schema BooleanLiteral extends PrimaryExpression { impl BooleanLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BooleanLiteral { + pub fn __all__(db: JavascriptDB) -> *BooleanLiteral { for (tmp in PrimaryExpression(db)) { if (isBooleanLiteral(Node {id: tmp.id})) { yield BooleanLiteral { @@ -3037,7 +3037,7 @@ schema NumericLiteral extends LiteralExpression { impl NumericLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NumericLiteral { + pub fn __all__(db: JavascriptDB) -> *NumericLiteral { for (tmp in LiteralExpression(db)) { if (isNumericLiteral(Node {id: tmp.id})) { yield NumericLiteral { @@ -3057,7 +3057,7 @@ schema BigIntLiteral extends LiteralExpression { impl BigIntLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BigIntLiteral { + pub fn __all__(db: JavascriptDB) -> *BigIntLiteral { for (tmp in LiteralExpression(db)) { if (isBigIntLiteral(Node {id: tmp.id})) { yield BigIntLiteral { @@ -3077,7 +3077,7 @@ schema StringLiteral extends LiteralExpression { impl StringLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StringLiteral { + pub fn __all__(db: JavascriptDB) -> *StringLiteral { for (tmp in LiteralExpression(db)) { if (isStringLiteral(Node {id: tmp.id})) { yield StringLiteral { @@ -3101,7 +3101,7 @@ schema RegularExpressionLiteral extends LiteralExpression { impl RegularExpressionLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RegularExpressionLiteral { + pub fn __all__(db: JavascriptDB) -> *RegularExpressionLiteral { for (tmp in LiteralExpression(db)) { if (isRegularExpressionLiteral(Node {id: tmp.id})) { yield RegularExpressionLiteral { @@ -3121,7 +3121,7 @@ schema NoSubstitutionTemplateLiteral extends LiteralExpression { impl NoSubstitutionTemplateLiteral { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NoSubstitutionTemplateLiteral { + pub fn __all__(db: JavascriptDB) -> *NoSubstitutionTemplateLiteral { for (tmp in LiteralExpression(db)) { if (isNoSubstitutionTemplateLiteral(Node {id: tmp.id})) { yield NoSubstitutionTemplateLiteral { @@ -3141,7 +3141,7 @@ schema Decorator extends Node { impl Decorator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Decorator { + pub fn __all__(db: JavascriptDB) -> *Decorator { for (tmp in Node(db)) { if (isDecorator(tmp)) { yield Decorator { @@ -3185,7 +3185,7 @@ schema CallLikeExpression extends Expression { impl CallLikeExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CallLikeExpression { + pub fn __all__(db: JavascriptDB) -> *CallLikeExpression { for (tmp in Expression(db)) { if (isCallLikeExpression(Node {id: tmp.id})) { yield CallLikeExpression { @@ -3229,7 +3229,7 @@ schema MayInvokeExpression extends Expression { impl MayInvokeExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MayInvokeExpression { + pub fn __all__(db: JavascriptDB) -> *MayInvokeExpression { for (tmp in Expression(db)) { if (isMayInvokeExpression(Node {id: tmp.id})) { yield MayInvokeExpression { diff --git a/language/javascript/lib/FileSystem.gdl b/language/javascript/lib/FileSystem.gdl index 1767a3eb..7cfff15e 100644 --- a/language/javascript/lib/FileSystem.gdl +++ b/language/javascript/lib/FileSystem.gdl @@ -12,7 +12,7 @@ schema File extends FileDO { impl File { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *File { + pub fn __all__(db: JavascriptDB) -> *File { for (tmp in FileDO(db)) { yield File { oid : tmp.oid, diff --git a/language/javascript/lib/Function.gdl b/language/javascript/lib/Function.gdl index 40e1aa3e..3e46c062 100644 --- a/language/javascript/lib/Function.gdl +++ b/language/javascript/lib/Function.gdl @@ -12,7 +12,7 @@ schema FunctionLike extends Node { impl FunctionLike { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionLike { + pub fn __all__(db: JavascriptDB) -> *FunctionLike { for (tmp in Node(db)) { if (isFunctionLike(tmp)) { yield FunctionLike { @@ -34,7 +34,7 @@ schema CallSite extends CallSiteDO { impl CallSite { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CallSite { + pub fn __all__(db: JavascriptDB) -> *CallSite { for (tmp in CallSiteDO(db)) { yield CallSite { invoke_expression_oid : tmp.invoke_expression_oid, @@ -67,7 +67,7 @@ schema FunctionLikeDeclaration extends FunctionLike { impl FunctionLikeDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionLikeDeclaration { + pub fn __all__(db: JavascriptDB) -> *FunctionLikeDeclaration { for (tmp in FunctionLike(db)) { if (isFunctionLikeDeclaration(Node {id: tmp.id})) { yield FunctionLikeDeclaration { @@ -375,7 +375,7 @@ schema FunctionDeclaration extends FunctionLikeDeclaration { impl FunctionDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionDeclaration { + pub fn __all__(db: JavascriptDB) -> *FunctionDeclaration { for (tmp in FunctionLikeDeclaration(db)) { if (isFunctionDeclaration(Node {id: tmp.id})) { yield FunctionDeclaration { @@ -395,7 +395,7 @@ schema MethodDeclaration extends FunctionLikeDeclaration { impl MethodDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MethodDeclaration { + pub fn __all__(db: JavascriptDB) -> *MethodDeclaration { for (tmp in FunctionLikeDeclaration(db)) { if (isMethodDeclaration(Node {id: tmp.id})) { yield MethodDeclaration { @@ -419,7 +419,7 @@ schema ConstructorDeclaration extends FunctionLikeDeclaration { impl ConstructorDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConstructorDeclaration { + pub fn __all__(db: JavascriptDB) -> *ConstructorDeclaration { for (tmp in FunctionLikeDeclaration(db)) { if (isConstructor(Node {id: tmp.id})) { yield ConstructorDeclaration { @@ -439,7 +439,7 @@ schema GetAccessor extends FunctionLikeDeclaration { impl GetAccessor { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GetAccessor { + pub fn __all__(db: JavascriptDB) -> *GetAccessor { for (tmp in FunctionLikeDeclaration(db)) { if (isGetAccessor(Node {id: tmp.id})) { yield GetAccessor { @@ -459,7 +459,7 @@ schema SetAccessor extends FunctionLikeDeclaration { impl SetAccessor { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SetAccessor { + pub fn __all__(db: JavascriptDB) -> *SetAccessor { for (tmp in FunctionLikeDeclaration(db)) { if (isSetAccessor(Node {id: tmp.id})) { yield SetAccessor { @@ -479,7 +479,7 @@ schema FunctionExpressionDeclaration extends FunctionLikeDeclaration { impl FunctionExpressionDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionExpressionDeclaration { + pub fn __all__(db: JavascriptDB) -> *FunctionExpressionDeclaration { for (tmp in FunctionLikeDeclaration(db)) { if (isFunctionExpression(Node {id: tmp.id})) { yield FunctionExpressionDeclaration { @@ -499,7 +499,7 @@ schema ArrowFunction extends FunctionLikeDeclaration { impl ArrowFunction { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ArrowFunction { + pub fn __all__(db: JavascriptDB) -> *ArrowFunction { for (tmp in FunctionLikeDeclaration(db)) { if (isArrowFunction(Node {id: tmp.id})) { yield ArrowFunction { diff --git a/language/javascript/lib/HeritageClause.gdl b/language/javascript/lib/HeritageClause.gdl index bfd644eb..20a27903 100644 --- a/language/javascript/lib/HeritageClause.gdl +++ b/language/javascript/lib/HeritageClause.gdl @@ -12,7 +12,7 @@ schema HeritageToken extends Node { impl HeritageToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *HeritageToken { + pub fn __all__(db: JavascriptDB) -> *HeritageToken { for (tmp in Node(db)) { if (isHeritageToken(tmp)) { yield HeritageToken { @@ -32,7 +32,7 @@ schema HeritageClause extends Node { impl HeritageClause { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *HeritageClause { + pub fn __all__(db: JavascriptDB) -> *HeritageClause { for (tmp in Node(db)) { if (isHeritageClause(tmp)) { yield HeritageClause { diff --git a/language/javascript/lib/ImportOrExportElement.gdl b/language/javascript/lib/ImportOrExportElement.gdl index 212f255c..5f48322d 100644 --- a/language/javascript/lib/ImportOrExportElement.gdl +++ b/language/javascript/lib/ImportOrExportElement.gdl @@ -12,7 +12,7 @@ schema QualifiedName extends Node { impl QualifiedName { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *QualifiedName { + pub fn __all__(db: JavascriptDB) -> *QualifiedName { for (tmp in Node(db)) { if (isQualifiedName(tmp)) { yield QualifiedName { @@ -32,7 +32,7 @@ schema ImportClause extends Node { impl ImportClause { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportClause { + pub fn __all__(db: JavascriptDB) -> *ImportClause { for (tmp in Node(db)) { if (isImportClause(tmp)) { yield ImportClause { @@ -52,7 +52,7 @@ schema NamespaceImport extends Node { impl NamespaceImport { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NamespaceImport { + pub fn __all__(db: JavascriptDB) -> *NamespaceImport { for (tmp in Node(db)) { if (isNamespaceImport(tmp)) { yield NamespaceImport { @@ -72,7 +72,7 @@ schema NamedImports extends Node { impl NamedImports { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NamedImports { + pub fn __all__(db: JavascriptDB) -> *NamedImports { for (tmp in Node(db)) { if (isNamedImports(tmp)) { yield NamedImports { @@ -92,7 +92,7 @@ schema ImportSpecifier extends Node { impl ImportSpecifier { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportSpecifier { + pub fn __all__(db: JavascriptDB) -> *ImportSpecifier { for (tmp in Node(db)) { if (isImportSpecifier(tmp)) { yield ImportSpecifier { @@ -112,7 +112,7 @@ schema NamedExports extends Node { impl NamedExports { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NamedExports { + pub fn __all__(db: JavascriptDB) -> *NamedExports { for (tmp in Node(db)) { if (isNamedExports(tmp)) { yield NamedExports { @@ -132,7 +132,7 @@ schema NamespaceExport extends Node { impl NamespaceExport { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NamespaceExport { + pub fn __all__(db: JavascriptDB) -> *NamespaceExport { for (tmp in Node(db)) { if (isNamespaceExport(tmp)) { yield NamespaceExport { @@ -152,7 +152,7 @@ schema ExportSpecifier extends Node { impl ExportSpecifier { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExportSpecifier { + pub fn __all__(db: JavascriptDB) -> *ExportSpecifier { for (tmp in Node(db)) { if (isExportSpecifier(tmp)) { yield ExportSpecifier { @@ -172,7 +172,7 @@ schema ExternalModuleReference extends Node { impl ExternalModuleReference { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExternalModuleReference { + pub fn __all__(db: JavascriptDB) -> *ExternalModuleReference { for (tmp in Node(db)) { if (isExternalModuleReference(tmp)) { yield ExternalModuleReference { diff --git a/language/javascript/lib/JSX.gdl b/language/javascript/lib/JSX.gdl index 6ccc8a86..66fbffdb 100644 --- a/language/javascript/lib/JSX.gdl +++ b/language/javascript/lib/JSX.gdl @@ -12,7 +12,7 @@ schema JsxText extends Node { impl JsxText { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxText { + pub fn __all__(db: JavascriptDB) -> *JsxText { for (tmp in Node(db)) { if (isJsxText(tmp)) { yield JsxText { @@ -45,7 +45,7 @@ schema JsxElement extends PrimaryExpression { impl JsxElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxElement { + pub fn __all__(db: JavascriptDB) -> *JsxElement { for (tmp in PrimaryExpression(db)) { if (isJsxElement(Node {id: tmp.id})) { yield JsxElement { @@ -65,7 +65,7 @@ schema JsxSelfClosingElement extends PrimaryExpression { impl JsxSelfClosingElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxSelfClosingElement { + pub fn __all__(db: JavascriptDB) -> *JsxSelfClosingElement { for (tmp in PrimaryExpression(db)) { if (isJsxSelfClosingElement(Node {id: tmp.id})) { yield JsxSelfClosingElement { @@ -85,7 +85,7 @@ schema JsxOpeningElement extends Expression { impl JsxOpeningElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxOpeningElement { + pub fn __all__(db: JavascriptDB) -> *JsxOpeningElement { for (tmp in Expression(db)) { if (isJsxOpeningElement(Node {id: tmp.id})) { yield JsxOpeningElement { @@ -126,7 +126,7 @@ schema JsxClosingElement extends Expression { impl JsxClosingElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxClosingElement { + pub fn __all__(db: JavascriptDB) -> *JsxClosingElement { for (tmp in Expression(db)) { if (isJsxClosingElement(Node {id: tmp.id})) { yield JsxClosingElement { @@ -154,7 +154,7 @@ schema JsxFragment extends PrimaryExpression { impl JsxFragment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxFragment { + pub fn __all__(db: JavascriptDB) -> *JsxFragment { for (tmp in PrimaryExpression(db)) { if (isJsxFragment(Node {id: tmp.id})) { yield JsxFragment { @@ -174,7 +174,7 @@ schema JsxOpeningFragment extends Expression { impl JsxOpeningFragment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxOpeningFragment { + pub fn __all__(db: JavascriptDB) -> *JsxOpeningFragment { for (tmp in Expression(db)) { if (isJsxOpeningFragment(Node {id: tmp.id})) { yield JsxOpeningFragment { @@ -202,7 +202,7 @@ schema JsxClosingFragment extends Expression { impl JsxClosingFragment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxClosingFragment { + pub fn __all__(db: JavascriptDB) -> *JsxClosingFragment { for (tmp in Expression(db)) { if (isJsxClosingFragment(Node {id: tmp.id})) { yield JsxClosingFragment { @@ -230,7 +230,7 @@ schema JsxAttribute extends Node { impl JsxAttribute { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxAttribute { + pub fn __all__(db: JavascriptDB) -> *JsxAttribute { for (tmp in Node(db)) { if (isJsxAttribute(tmp)) { yield JsxAttribute { @@ -274,7 +274,7 @@ schema JsxAttributes extends PrimaryExpression { impl JsxAttributes { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxAttributes { + pub fn __all__(db: JavascriptDB) -> *JsxAttributes { for (tmp in PrimaryExpression(db)) { if (isJsxAttributes(Node {id: tmp.id})) { yield JsxAttributes { @@ -294,7 +294,7 @@ schema JsxSpreadAttribute extends Node { impl JsxSpreadAttribute { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxSpreadAttribute { + pub fn __all__(db: JavascriptDB) -> *JsxSpreadAttribute { for (tmp in Node(db)) { if (isJsxSpreadAttribute(tmp)) { yield JsxSpreadAttribute { @@ -330,7 +330,7 @@ schema JsxExpression extends Expression { impl JsxExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxExpression { + pub fn __all__(db: JavascriptDB) -> *JsxExpression { for (tmp in Expression(db)) { if (isJsxExpression(Node {id: tmp.id})) { yield JsxExpression { @@ -350,7 +350,7 @@ schema JsxAttributeInitializer extends Node { impl JsxAttributeInitializer { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxAttributeInitializer { + pub fn __all__(db: JavascriptDB) -> *JsxAttributeInitializer { for (tmp in Node(db)) { if (isStringLiteral(tmp)) { yield JsxAttributeInitializer { diff --git a/language/javascript/lib/Location.gdl b/language/javascript/lib/Location.gdl index 4cbf7f0f..6c0fe9f0 100644 --- a/language/javascript/lib/Location.gdl +++ b/language/javascript/lib/Location.gdl @@ -12,7 +12,7 @@ schema Location extends LocationDO { impl Location { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Location { + pub fn __all__(db: JavascriptDB) -> *Location { for (tmp in LocationDO(db)) { yield Location { oid : tmp.oid, diff --git a/language/javascript/lib/Modifier.gdl b/language/javascript/lib/Modifier.gdl index 8fd01079..2689dcb5 100644 --- a/language/javascript/lib/Modifier.gdl +++ b/language/javascript/lib/Modifier.gdl @@ -12,7 +12,7 @@ schema Modifier extends Token { impl Modifier { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Modifier { + pub fn __all__(db: JavascriptDB) -> *Modifier { for (tmp in Token(db)) { if (isModifier(Node {id: tmp.id})) { yield Modifier { @@ -32,7 +32,7 @@ schema ConstKeyword extends Modifier { impl ConstKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConstKeyword { + pub fn __all__(db: JavascriptDB) -> *ConstKeyword { for (tmp in Modifier(db)) { if (isConstKeyword(Node {id: tmp.id})) { yield ConstKeyword { @@ -52,7 +52,7 @@ schema DefaultKeyword extends Modifier { impl DefaultKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DefaultKeyword { + pub fn __all__(db: JavascriptDB) -> *DefaultKeyword { for (tmp in Modifier(db)) { if (isDefaultKeyword(Node {id: tmp.id})) { yield DefaultKeyword { @@ -72,7 +72,7 @@ schema ExportKeyword extends Modifier { impl ExportKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExportKeyword { + pub fn __all__(db: JavascriptDB) -> *ExportKeyword { for (tmp in Modifier(db)) { if (isExportKeyword(Node {id: tmp.id})) { yield ExportKeyword { @@ -92,7 +92,7 @@ schema PrivateKeyword extends Modifier { impl PrivateKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrivateKeyword { + pub fn __all__(db: JavascriptDB) -> *PrivateKeyword { for (tmp in Modifier(db)) { if (isPrivateKeyword(Node {id: tmp.id})) { yield PrivateKeyword { @@ -112,7 +112,7 @@ schema ProtectedKeyword extends Modifier { impl ProtectedKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ProtectedKeyword { + pub fn __all__(db: JavascriptDB) -> *ProtectedKeyword { for (tmp in Modifier(db)) { if (isProtectedKeyword(Node {id: tmp.id})) { yield ProtectedKeyword { @@ -132,7 +132,7 @@ schema PublicKeyword extends Modifier { impl PublicKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PublicKeyword { + pub fn __all__(db: JavascriptDB) -> *PublicKeyword { for (tmp in Modifier(db)) { if (isPublicKeyword(Node {id: tmp.id})) { yield PublicKeyword { @@ -152,7 +152,7 @@ schema StaticKeyword extends Modifier { impl StaticKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StaticKeyword { + pub fn __all__(db: JavascriptDB) -> *StaticKeyword { for (tmp in Modifier(db)) { if (isStaticKeyword(Node {id: tmp.id})) { yield StaticKeyword { @@ -172,7 +172,7 @@ schema AbstractKeyword extends Modifier { impl AbstractKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AbstractKeyword { + pub fn __all__(db: JavascriptDB) -> *AbstractKeyword { for (tmp in Modifier(db)) { if (isAbstractKeyword(Node {id: tmp.id})) { yield AbstractKeyword { @@ -192,7 +192,7 @@ schema AsyncKeyword extends Modifier { impl AsyncKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AsyncKeyword { + pub fn __all__(db: JavascriptDB) -> *AsyncKeyword { for (tmp in Modifier(db)) { if (isAsyncKeyword(Node {id: tmp.id})) { yield AsyncKeyword { @@ -212,7 +212,7 @@ schema DeclareKeyword extends Modifier { impl DeclareKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DeclareKeyword { + pub fn __all__(db: JavascriptDB) -> *DeclareKeyword { for (tmp in Modifier(db)) { if (isDeclareKeyword(Node {id: tmp.id})) { yield DeclareKeyword { @@ -232,7 +232,7 @@ schema ReadonlyKeyword extends Modifier { impl ReadonlyKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ReadonlyKeyword { + pub fn __all__(db: JavascriptDB) -> *ReadonlyKeyword { for (tmp in Modifier(db)) { if (isReadonlyKeyword(Node {id: tmp.id})) { yield ReadonlyKeyword { @@ -252,7 +252,7 @@ schema OverrideKeyword extends Modifier { impl OverrideKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *OverrideKeyword { + pub fn __all__(db: JavascriptDB) -> *OverrideKeyword { for (tmp in Modifier(db)) { if (isOverrideKeyword(Node {id: tmp.id})) { yield OverrideKeyword { diff --git a/language/javascript/lib/Node.gdl b/language/javascript/lib/Node.gdl index 3512a019..74acbc08 100644 --- a/language/javascript/lib/Node.gdl +++ b/language/javascript/lib/Node.gdl @@ -13,7 +13,7 @@ schema Node { impl Node { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Node { + pub fn __all__(db: JavascriptDB) -> *Node { for (nodeDO in NodeDO(db)) { yield Node {id : nodeDO.oid} } diff --git a/language/javascript/lib/NumberOfLines.gdl b/language/javascript/lib/NumberOfLines.gdl index ef3f0df6..3a91ca5e 100644 --- a/language/javascript/lib/NumberOfLines.gdl +++ b/language/javascript/lib/NumberOfLines.gdl @@ -12,7 +12,7 @@ schema NumberOfLines extends NumberOfLinesDO { impl NumberOfLines { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NumberOfLines { + pub fn __all__(db: JavascriptDB) -> *NumberOfLines { for (tmp in NumberOfLinesDO(db)) { yield NumberOfLines { location_oid : tmp.location_oid, diff --git a/language/javascript/lib/ObjectLiteral.gdl b/language/javascript/lib/ObjectLiteral.gdl index 3415bdf2..ef7788d5 100644 --- a/language/javascript/lib/ObjectLiteral.gdl +++ b/language/javascript/lib/ObjectLiteral.gdl @@ -12,7 +12,7 @@ schema ObjectLiteralExpression extends PrimaryExpression { impl ObjectLiteralExpression { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ObjectLiteralExpression { + pub fn __all__(db: JavascriptDB) -> *ObjectLiteralExpression { for (tmp in PrimaryExpression(db)) { if (isObjectLiteralExpression(Node {id: tmp.id})) { yield ObjectLiteralExpression { @@ -93,7 +93,7 @@ schema ObjectLiteralElement extends Node { impl ObjectLiteralElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ObjectLiteralElement { + pub fn __all__(db: JavascriptDB) -> *ObjectLiteralElement { for (tmp in Node(db)) { if (isObjectLiteralElement(tmp)) { yield ObjectLiteralElement { @@ -143,7 +143,7 @@ schema ComputedPropertyName extends Node { impl ComputedPropertyName { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ComputedPropertyName { + pub fn __all__(db: JavascriptDB) -> *ComputedPropertyName { for (tmp in Node(db)) { if (isComputedPropertyName(tmp)) { yield ComputedPropertyName { @@ -170,7 +170,7 @@ schema PropertyName extends Node { impl PropertyName { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PropertyName { + pub fn __all__(db: JavascriptDB) -> *PropertyName { for (tmp in Node(db)) { if (isPropertyName(tmp)) { yield PropertyName { @@ -218,7 +218,7 @@ schema PropertyAssignment extends ObjectLiteralElement { impl PropertyAssignment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PropertyAssignment { + pub fn __all__(db: JavascriptDB) -> *PropertyAssignment { for (tmp in ObjectLiteralElement(db)) { if (isPropertyAssignment(Node {id: tmp.id})) { yield PropertyAssignment { @@ -276,7 +276,7 @@ schema ShorthandPropertyAssignment extends ObjectLiteralElement { impl ShorthandPropertyAssignment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ShorthandPropertyAssignment { + pub fn __all__(db: JavascriptDB) -> *ShorthandPropertyAssignment { for (tmp in ObjectLiteralElement(db)) { if (isShorthandPropertyAssignment(Node {id: tmp.id})) { yield ShorthandPropertyAssignment { @@ -338,7 +338,7 @@ schema SpreadAssignment extends ObjectLiteralElement { impl SpreadAssignment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SpreadAssignment { + pub fn __all__(db: JavascriptDB) -> *SpreadAssignment { for (tmp in ObjectLiteralElement(db)) { if (isSpreadAssignment(Node {id: tmp.id})) { yield SpreadAssignment { diff --git a/language/javascript/lib/Statement.gdl b/language/javascript/lib/Statement.gdl index 07819881..8c5c3f96 100644 --- a/language/javascript/lib/Statement.gdl +++ b/language/javascript/lib/Statement.gdl @@ -12,7 +12,7 @@ schema Statement extends Node { impl Statement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Statement { + pub fn __all__(db: JavascriptDB) -> *Statement { for (tmp in Node(db)) { if (isStatement(tmp)) { yield Statement { @@ -32,7 +32,7 @@ schema DeclarationStatement extends Statement { impl DeclarationStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DeclarationStatement { + pub fn __all__(db: JavascriptDB) -> *DeclarationStatement { for (tmp in Statement(db)) { if (isDeclarationStatement(Node {id: tmp.id})) { yield DeclarationStatement { @@ -52,7 +52,7 @@ schema StatementButNotDeclaration extends Statement { impl StatementButNotDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StatementButNotDeclaration { + pub fn __all__(db: JavascriptDB) -> *StatementButNotDeclaration { for (tmp in Statement(db)) { if (isStatementButNotDeclaration(Node {id: tmp.id})) { yield StatementButNotDeclaration { @@ -72,7 +72,7 @@ schema BlockStatement extends Statement { impl BlockStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BlockStatement { + pub fn __all__(db: JavascriptDB) -> *BlockStatement { for (tmp in Statement(db)) { if (isBlockStatement(Node {id: tmp.id})) { yield BlockStatement { @@ -123,7 +123,7 @@ schema EmptyStatement extends Statement { impl EmptyStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EmptyStatement { + pub fn __all__(db: JavascriptDB) -> *EmptyStatement { for (tmp in Statement(db)) { if (tmp.getKind() = 235) { yield EmptyStatement { @@ -143,7 +143,7 @@ schema VariableStatement extends Statement { impl VariableStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VariableStatement { + pub fn __all__(db: JavascriptDB) -> *VariableStatement { for (tmp in Statement(db)) { if (isVariableStatement(Node {id: tmp.id})) { yield VariableStatement { @@ -176,7 +176,7 @@ schema ExpressionStatement extends Statement { impl ExpressionStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExpressionStatement { + pub fn __all__(db: JavascriptDB) -> *ExpressionStatement { for (tmp in Statement(db)) { if (isExpressionStatement(Node {id: tmp.id})) { yield ExpressionStatement { @@ -206,7 +206,7 @@ schema IfStatement extends Statement { impl IfStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IfStatement { + pub fn __all__(db: JavascriptDB) -> *IfStatement { for (tmp in Statement(db)) { if (isIfStatement(Node {id: tmp.id})) { yield IfStatement { @@ -270,7 +270,7 @@ schema DoWhileStatement extends Statement { impl DoWhileStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DoWhileStatement { + pub fn __all__(db: JavascriptDB) -> *DoWhileStatement { for (tmp in Statement(db)) { if (isDoWhileStatement(Node {id: tmp.id})) { yield DoWhileStatement { @@ -312,7 +312,7 @@ schema WhileStatement extends Statement { impl WhileStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *WhileStatement { + pub fn __all__(db: JavascriptDB) -> *WhileStatement { for (tmp in Statement(db)) { if (isWhileStatement(Node {id: tmp.id})) { yield WhileStatement { @@ -354,7 +354,7 @@ schema ForInitializer extends Node { impl ForInitializer { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ForInitializer { + pub fn __all__(db: JavascriptDB) -> *ForInitializer { for (tmp in Node(db)) { if (isForInitializer(tmp)) { yield ForInitializer { @@ -374,7 +374,7 @@ schema ForStatement extends Statement { impl ForStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ForStatement { + pub fn __all__(db: JavascriptDB) -> *ForStatement { for (tmp in Statement(db)) { if (isForStatement(Node {id: tmp.id})) { yield ForStatement { @@ -480,7 +480,7 @@ schema EnhancedForStatement extends Statement { impl EnhancedForStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EnhancedForStatement { + pub fn __all__(db: JavascriptDB) -> *EnhancedForStatement { for (tmp in Statement(db)) { if (isEnhancedForStatement(Node {id: tmp.id})) { yield EnhancedForStatement { @@ -567,7 +567,7 @@ schema ForInStatement extends EnhancedForStatement { impl ForInStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ForInStatement { + pub fn __all__(db: JavascriptDB) -> *ForInStatement { for (tmp in EnhancedForStatement(db)) { if (isForInStatement(Node {id: tmp.id})) { yield ForInStatement { @@ -587,7 +587,7 @@ schema ForOfStatement extends EnhancedForStatement { impl ForOfStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ForOfStatement { + pub fn __all__(db: JavascriptDB) -> *ForOfStatement { for (tmp in EnhancedForStatement(db)) { if (isForOfStatement(Node {id: tmp.id})) { yield ForOfStatement { @@ -619,7 +619,7 @@ schema IterationStatement extends Statement { impl IterationStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IterationStatement { + pub fn __all__(db: JavascriptDB) -> *IterationStatement { for (tmp in Statement(db)) { if (isIterationStatement(Node {id: tmp.id})) { yield IterationStatement { @@ -701,7 +701,7 @@ schema ContinueStatement extends Statement { impl ContinueStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ContinueStatement { + pub fn __all__(db: JavascriptDB) -> *ContinueStatement { for (tmp in Statement(db)) { if (isContinueStatement(Node {id: tmp.id})) { yield ContinueStatement { @@ -721,7 +721,7 @@ schema BreakStatement extends Statement { impl BreakStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BreakStatement { + pub fn __all__(db: JavascriptDB) -> *BreakStatement { for (tmp in Statement(db)) { if (isBreakStatement(Node {id: tmp.id})) { yield BreakStatement { @@ -741,7 +741,7 @@ schema ReturnStatement extends Statement { impl ReturnStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ReturnStatement { + pub fn __all__(db: JavascriptDB) -> *ReturnStatement { for (tmp in Statement(db)) { if (isReturnStatement(Node {id: tmp.id})) { yield ReturnStatement { @@ -772,7 +772,7 @@ schema WithStatement extends Statement { impl WithStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *WithStatement { + pub fn __all__(db: JavascriptDB) -> *WithStatement { for (tmp in Statement(db)) { if (isWithStatement(Node {id: tmp.id})) { yield WithStatement { @@ -817,7 +817,7 @@ schema FunctionDeclarationStatement extends DeclarationStatement { impl FunctionDeclarationStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionDeclarationStatement { + pub fn __all__(db: JavascriptDB) -> *FunctionDeclarationStatement { for (tmp in DeclarationStatement(db)) { if (isFunctionDeclaration(Node {id: tmp.id})) { yield FunctionDeclarationStatement { @@ -837,7 +837,7 @@ schema ClassDeclarationStatement extends DeclarationStatement { impl ClassDeclarationStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ClassDeclarationStatement { + pub fn __all__(db: JavascriptDB) -> *ClassDeclarationStatement { for (tmp in DeclarationStatement(db)) { if (isClassDeclaration(Node {id: tmp.id})) { yield ClassDeclarationStatement { @@ -857,7 +857,7 @@ schema InterfaceDeclaration extends DeclarationStatement { impl InterfaceDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InterfaceDeclaration { + pub fn __all__(db: JavascriptDB) -> *InterfaceDeclaration { for (tmp in DeclarationStatement(db)) { if (isInterfaceDeclaration(Node {id: tmp.id})) { yield InterfaceDeclaration { @@ -877,7 +877,7 @@ schema TypeAliasDeclaration extends DeclarationStatement { impl TypeAliasDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeAliasDeclaration { + pub fn __all__(db: JavascriptDB) -> *TypeAliasDeclaration { for (tmp in DeclarationStatement(db)) { if (isTypeAliasDeclaration(Node {id: tmp.id})) { yield TypeAliasDeclaration { @@ -897,7 +897,7 @@ schema EnumDeclaration extends DeclarationStatement { impl EnumDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EnumDeclaration { + pub fn __all__(db: JavascriptDB) -> *EnumDeclaration { for (tmp in DeclarationStatement(db)) { if (isEnumDeclaration(Node {id: tmp.id})) { yield EnumDeclaration { @@ -961,7 +961,7 @@ schema ModuleDeclaration extends DeclarationStatement { impl ModuleDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ModuleDeclaration { + pub fn __all__(db: JavascriptDB) -> *ModuleDeclaration { for (tmp in DeclarationStatement(db)) { if (isModuleDeclaration(Node {id: tmp.id})) { yield ModuleDeclaration { @@ -981,7 +981,7 @@ schema NamespaceExportDeclaration extends DeclarationStatement { impl NamespaceExportDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NamespaceExportDeclaration { + pub fn __all__(db: JavascriptDB) -> *NamespaceExportDeclaration { for (tmp in DeclarationStatement(db)) { if (isNamespaceExportDeclaration(Node {id: tmp.id})) { yield NamespaceExportDeclaration { @@ -1001,7 +1001,7 @@ schema ImportEqualsDeclaration extends DeclarationStatement { impl ImportEqualsDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportEqualsDeclaration { + pub fn __all__(db: JavascriptDB) -> *ImportEqualsDeclaration { for (tmp in DeclarationStatement(db)) { if (isImportEqualsDeclaration(Node {id: tmp.id})) { yield ImportEqualsDeclaration { @@ -1021,7 +1021,7 @@ schema ImportDeclaration extends DeclarationStatement { impl ImportDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportDeclaration { + pub fn __all__(db: JavascriptDB) -> *ImportDeclaration { for (tmp in DeclarationStatement(db)) { if (isImportDeclaration(Node {id: tmp.id})) { yield ImportDeclaration { @@ -1041,7 +1041,7 @@ schema ExportAssignment extends DeclarationStatement { impl ExportAssignment { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExportAssignment { + pub fn __all__(db: JavascriptDB) -> *ExportAssignment { for (tmp in DeclarationStatement(db)) { if (isExportAssignment(Node {id: tmp.id})) { yield ExportAssignment { @@ -1061,7 +1061,7 @@ schema ExportDeclaration extends DeclarationStatement { impl ExportDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExportDeclaration { + pub fn __all__(db: JavascriptDB) -> *ExportDeclaration { for (tmp in DeclarationStatement(db)) { if (isExportDeclaration(Node {id: tmp.id})) { yield ExportDeclaration { @@ -1081,7 +1081,7 @@ schema MissingDeclaration extends DeclarationStatement { impl MissingDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MissingDeclaration { + pub fn __all__(db: JavascriptDB) -> *MissingDeclaration { for (tmp in DeclarationStatement(db)) { if (isMissingDeclaration(Node {id: tmp.id})) { yield MissingDeclaration { @@ -1117,7 +1117,7 @@ schema CaseClause extends Statement { impl CaseClause { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CaseClause { + pub fn __all__(db: JavascriptDB) -> *CaseClause { for (tmp in Statement(db)) { if (isCaseClause(Node {id: tmp.id})) { yield CaseClause { @@ -1172,7 +1172,7 @@ schema DefaultClause extends Statement { impl DefaultClause { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DefaultClause { + pub fn __all__(db: JavascriptDB) -> *DefaultClause { for (tmp in Statement(db)) { if (isDefaultClause(Node {id: tmp.id})) { yield DefaultClause { @@ -1215,7 +1215,7 @@ schema CatchClause extends Statement { impl CatchClause { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CatchClause { + pub fn __all__(db: JavascriptDB) -> *CatchClause { for (tmp in Statement(db)) { if (isCatchClause(Node {id: tmp.id})) { yield CatchClause { @@ -1268,7 +1268,7 @@ schema CaseBlock extends Statement { impl CaseBlock { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CaseBlock { + pub fn __all__(db: JavascriptDB) -> *CaseBlock { for (tmp in Statement(db)) { if (isCaseBlock(Node {id: tmp.id})) { yield CaseBlock { @@ -1384,7 +1384,7 @@ schema SwitchStatement extends Statement { impl SwitchStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SwitchStatement { + pub fn __all__(db: JavascriptDB) -> *SwitchStatement { for (tmp in Statement(db)) { if (isSwitchStatement(Node {id: tmp.id})) { yield SwitchStatement { @@ -1420,7 +1420,7 @@ schema ThrowStatement extends Statement { impl ThrowStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ThrowStatement { + pub fn __all__(db: JavascriptDB) -> *ThrowStatement { for (tmp in Statement(db)) { if (isThrowStatement(Node {id: tmp.id})) { yield ThrowStatement { @@ -1451,7 +1451,7 @@ schema TryStatement extends Statement { impl TryStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TryStatement { + pub fn __all__(db: JavascriptDB) -> *TryStatement { for (tmp in Statement(db)) { if (isTryStatement(Node {id: tmp.id})) { yield TryStatement { @@ -1521,7 +1521,7 @@ schema DebuggerStatement extends Statement { impl DebuggerStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DebuggerStatement { + pub fn __all__(db: JavascriptDB) -> *DebuggerStatement { for (tmp in Statement(db)) { if (isDebuggerStatement(Node {id: tmp.id})) { yield DebuggerStatement { @@ -1542,7 +1542,7 @@ schema NotEmittedStatement extends Statement { impl NotEmittedStatement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NotEmittedStatement { + pub fn __all__(db: JavascriptDB) -> *NotEmittedStatement { for (tmp in Statement(db)) { if (isNotEmittedStatement(Node {id: tmp.id})) { yield NotEmittedStatement { @@ -1563,7 +1563,7 @@ schema MergeDeclarationMarker extends Statement { impl MergeDeclarationMarker { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MergeDeclarationMarker { + pub fn __all__(db: JavascriptDB) -> *MergeDeclarationMarker { for (tmp in Statement(db)) { if (isMergeDeclarationMarker(Node {id: tmp.id})) { yield MergeDeclarationMarker { @@ -1584,7 +1584,7 @@ schema EndOfDeclarationMarker extends Statement { impl EndOfDeclarationMarker { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EndOfDeclarationMarker { + pub fn __all__(db: JavascriptDB) -> *EndOfDeclarationMarker { for (tmp in Statement(db)) { if (isEndOfDeclarationMarker(Node {id: tmp.id})) { yield EndOfDeclarationMarker { diff --git a/language/javascript/lib/Symbol.gdl b/language/javascript/lib/Symbol.gdl index 4ff2b4cc..38dc98c7 100644 --- a/language/javascript/lib/Symbol.gdl +++ b/language/javascript/lib/Symbol.gdl @@ -12,7 +12,7 @@ schema Symbol extends SymbolDO { impl Symbol { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Symbol { + pub fn __all__(db: JavascriptDB) -> *Symbol { for (tmp in SymbolDO(db)) { yield Symbol { oid : tmp.oid, diff --git a/language/javascript/lib/Template.gdl b/language/javascript/lib/Template.gdl index c26f6398..9fe3e5c8 100644 --- a/language/javascript/lib/Template.gdl +++ b/language/javascript/lib/Template.gdl @@ -12,7 +12,7 @@ schema TemplateLiteralLikeNode extends Node { impl TemplateLiteralLikeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateLiteralLikeNode { + pub fn __all__(db: JavascriptDB) -> *TemplateLiteralLikeNode { for (tmp in Node(db)) { if (isTemplateLiteralLikeNode(tmp)) { yield TemplateLiteralLikeNode { @@ -45,7 +45,7 @@ schema TemplateHead extends TemplateLiteralLikeNode { impl TemplateHead { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateHead { + pub fn __all__(db: JavascriptDB) -> *TemplateHead { for (tmp in TemplateLiteralLikeNode(db)) { if (isTemplateHead(Node {id: tmp.id})) { yield TemplateHead { @@ -65,7 +65,7 @@ schema TemplateMiddle extends TemplateLiteralLikeNode { impl TemplateMiddle { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateMiddle { + pub fn __all__(db: JavascriptDB) -> *TemplateMiddle { for (tmp in TemplateLiteralLikeNode(db)) { if (isTemplateMiddle(Node {id: tmp.id})) { yield TemplateMiddle { @@ -85,7 +85,7 @@ schema TemplateTail extends TemplateLiteralLikeNode { impl TemplateTail { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateTail { + pub fn __all__(db: JavascriptDB) -> *TemplateTail { for (tmp in TemplateLiteralLikeNode(db)) { if (isTemplateTail(Node {id: tmp.id})) { yield TemplateTail { @@ -105,7 +105,7 @@ schema TemplateSpan extends Node { impl TemplateSpan { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateSpan { + pub fn __all__(db: JavascriptDB) -> *TemplateSpan { for (tmp in Node(db)) { if (isTemplateSpan(tmp)) { yield TemplateSpan { diff --git a/language/javascript/lib/Token.gdl b/language/javascript/lib/Token.gdl index 1f17d8c5..00516d4d 100644 --- a/language/javascript/lib/Token.gdl +++ b/language/javascript/lib/Token.gdl @@ -12,7 +12,7 @@ schema Token extends Node { impl Token { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Token { + pub fn __all__(db: JavascriptDB) -> *Token { for (tmp in Node(db)) { if (isToken(tmp)) { yield Token { @@ -32,7 +32,7 @@ schema Unknown extends Token { impl Unknown { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *Unknown { + pub fn __all__(db: JavascriptDB) -> *Unknown { for (tmp in Token(db)) { if (isUnknown(Node {id: tmp.id})) { yield Unknown { @@ -52,7 +52,7 @@ schema EndOfFileToken extends Token { impl EndOfFileToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EndOfFileToken { + pub fn __all__(db: JavascriptDB) -> *EndOfFileToken { for (tmp in Token(db)) { if (isEndOfFileToken(Node {id: tmp.id})) { yield EndOfFileToken { @@ -72,7 +72,7 @@ schema NumericLiteralToken extends Token { impl NumericLiteralToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NumericLiteralToken { + pub fn __all__(db: JavascriptDB) -> *NumericLiteralToken { for (tmp in Token(db)) { if (isNumericLiteral(Node {id: tmp.id})) { yield NumericLiteralToken { @@ -92,7 +92,7 @@ schema BigIntLiteralToken extends Token { impl BigIntLiteralToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BigIntLiteralToken { + pub fn __all__(db: JavascriptDB) -> *BigIntLiteralToken { for (tmp in Token(db)) { if (isBigIntLiteral(Node {id: tmp.id})) { yield BigIntLiteralToken { @@ -112,7 +112,7 @@ schema StringLiteralToken extends Token { impl StringLiteralToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StringLiteralToken { + pub fn __all__(db: JavascriptDB) -> *StringLiteralToken { for (tmp in Token(db)) { if (isStringLiteral(Node {id: tmp.id})) { yield StringLiteralToken { @@ -132,7 +132,7 @@ schema JsxTextToken extends Token { impl JsxTextToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *JsxTextToken { + pub fn __all__(db: JavascriptDB) -> *JsxTextToken { for (tmp in Token(db)) { if (isJsxText(Node {id: tmp.id})) { yield JsxTextToken { @@ -152,7 +152,7 @@ schema RegularExpressionLiteralToken extends Token { impl RegularExpressionLiteralToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RegularExpressionLiteralToken { + pub fn __all__(db: JavascriptDB) -> *RegularExpressionLiteralToken { for (tmp in Token(db)) { if (isRegularExpressionLiteral(Node {id: tmp.id})) { yield RegularExpressionLiteralToken { @@ -172,7 +172,7 @@ schema NoSubstitutionTemplateLiteralToken extends Token { impl NoSubstitutionTemplateLiteralToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NoSubstitutionTemplateLiteralToken { + pub fn __all__(db: JavascriptDB) -> *NoSubstitutionTemplateLiteralToken { for (tmp in Token(db)) { if (isNoSubstitutionTemplateLiteral(Node {id: tmp.id})) { yield NoSubstitutionTemplateLiteralToken { @@ -192,7 +192,7 @@ schema TemplateHeadToken extends Token { impl TemplateHeadToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateHeadToken { + pub fn __all__(db: JavascriptDB) -> *TemplateHeadToken { for (tmp in Token(db)) { if (isTemplateHead(Node {id: tmp.id})) { yield TemplateHeadToken { @@ -212,7 +212,7 @@ schema TemplateMiddleToken extends Token { impl TemplateMiddleToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateMiddleToken { + pub fn __all__(db: JavascriptDB) -> *TemplateMiddleToken { for (tmp in Token(db)) { if (isTemplateMiddle(Node {id: tmp.id})) { yield TemplateMiddleToken { @@ -232,7 +232,7 @@ schema TemplateTailToken extends Token { impl TemplateTailToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateTailToken { + pub fn __all__(db: JavascriptDB) -> *TemplateTailToken { for (tmp in Token(db)) { if (isTemplateTail(Node {id: tmp.id})) { yield TemplateTailToken { @@ -252,7 +252,7 @@ schema DotDotDotToken extends Token { impl DotDotDotToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *DotDotDotToken { + pub fn __all__(db: JavascriptDB) -> *DotDotDotToken { for (tmp in Token(db)) { if (isDotDotDotToken(Node {id: tmp.id})) { yield DotDotDotToken { @@ -272,7 +272,7 @@ schema CommaToken extends Token { impl CommaToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CommaToken { + pub fn __all__(db: JavascriptDB) -> *CommaToken { for (tmp in Token(db)) { if (isCommaToken(Node {id: tmp.id})) { yield CommaToken { @@ -292,7 +292,7 @@ schema QuestionDotToken extends Token { impl QuestionDotToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *QuestionDotToken { + pub fn __all__(db: JavascriptDB) -> *QuestionDotToken { for (tmp in Token(db)) { if (isQuestionDotToken(Node {id: tmp.id})) { yield QuestionDotToken { @@ -312,7 +312,7 @@ schema LessThanToken extends Token { impl LessThanToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LessThanToken { + pub fn __all__(db: JavascriptDB) -> *LessThanToken { for (tmp in Token(db)) { if (isLessThanToken(Node {id: tmp.id})) { yield LessThanToken { @@ -332,7 +332,7 @@ schema GreaterThanToken extends Token { impl GreaterThanToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanToken { + pub fn __all__(db: JavascriptDB) -> *GreaterThanToken { for (tmp in Token(db)) { if (isGreaterThanToken(Node {id: tmp.id})) { yield GreaterThanToken { @@ -352,7 +352,7 @@ schema LessThanEqualsToken extends Token { impl LessThanEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LessThanEqualsToken { + pub fn __all__(db: JavascriptDB) -> *LessThanEqualsToken { for (tmp in Token(db)) { if (isLessThanEqualsToken(Node {id: tmp.id})) { yield LessThanEqualsToken { @@ -372,7 +372,7 @@ schema GreaterThanEqualsToken extends Token { impl GreaterThanEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanEqualsToken { + pub fn __all__(db: JavascriptDB) -> *GreaterThanEqualsToken { for (tmp in Token(db)) { if (isGreaterThanEqualsToken(Node {id: tmp.id})) { yield GreaterThanEqualsToken { @@ -392,7 +392,7 @@ schema EqualsEqualsToken extends Token { impl EqualsEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EqualsEqualsToken { + pub fn __all__(db: JavascriptDB) -> *EqualsEqualsToken { for (tmp in Token(db)) { if (isEqualsEqualsToken(Node {id: tmp.id})) { yield EqualsEqualsToken { @@ -412,7 +412,7 @@ schema ExclamationEqualsToken extends Token { impl ExclamationEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExclamationEqualsToken { + pub fn __all__(db: JavascriptDB) -> *ExclamationEqualsToken { for (tmp in Token(db)) { if (isExclamationEqualsToken(Node {id: tmp.id})) { yield ExclamationEqualsToken { @@ -432,7 +432,7 @@ schema EqualsEqualsEqualsToken extends Token { impl EqualsEqualsEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EqualsEqualsEqualsToken { + pub fn __all__(db: JavascriptDB) -> *EqualsEqualsEqualsToken { for (tmp in Token(db)) { if (isEqualsEqualsEqualsToken(Node {id: tmp.id})) { yield EqualsEqualsEqualsToken { @@ -452,7 +452,7 @@ schema ExclamationEqualsEqualsToken extends Token { impl ExclamationEqualsEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExclamationEqualsEqualsToken { + pub fn __all__(db: JavascriptDB) -> *ExclamationEqualsEqualsToken { for (tmp in Token(db)) { if (isExclamationEqualsEqualsToken(Node {id: tmp.id})) { yield ExclamationEqualsEqualsToken { @@ -472,7 +472,7 @@ schema PlusToken extends Token { impl PlusToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PlusToken { + pub fn __all__(db: JavascriptDB) -> *PlusToken { for (tmp in Token(db)) { if (isPlusToken(Node {id: tmp.id})) { yield PlusToken { @@ -492,7 +492,7 @@ schema MinusToken extends Token { impl MinusToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MinusToken { + pub fn __all__(db: JavascriptDB) -> *MinusToken { for (tmp in Token(db)) { if (isMinusToken(Node {id: tmp.id})) { yield MinusToken { @@ -512,7 +512,7 @@ schema AsteriskToken extends Token { impl AsteriskToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AsteriskToken { + pub fn __all__(db: JavascriptDB) -> *AsteriskToken { for (tmp in Token(db)) { if (isAsteriskToken(Node {id: tmp.id})) { yield AsteriskToken { @@ -532,7 +532,7 @@ schema AsteriskAsteriskToken extends Token { impl AsteriskAsteriskToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AsteriskAsteriskToken { + pub fn __all__(db: JavascriptDB) -> *AsteriskAsteriskToken { for (tmp in Token(db)) { if (isAsteriskAsteriskToken(Node {id: tmp.id})) { yield AsteriskAsteriskToken { @@ -552,7 +552,7 @@ schema SlashToken extends Token { impl SlashToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SlashToken { + pub fn __all__(db: JavascriptDB) -> *SlashToken { for (tmp in Token(db)) { if (isSlashToken(Node {id: tmp.id})) { yield SlashToken { @@ -572,7 +572,7 @@ schema PercentToken extends Token { impl PercentToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PercentToken { + pub fn __all__(db: JavascriptDB) -> *PercentToken { for (tmp in Token(db)) { if (isPercentToken(Node {id: tmp.id})) { yield PercentToken { @@ -592,7 +592,7 @@ schema PlusPlusToken extends Token { impl PlusPlusToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PlusPlusToken { + pub fn __all__(db: JavascriptDB) -> *PlusPlusToken { for (tmp in Token(db)) { if (isPlusPlusToken(Node {id: tmp.id})) { yield PlusPlusToken { @@ -612,7 +612,7 @@ schema MinusMinusToken extends Token { impl MinusMinusToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MinusMinusToken { + pub fn __all__(db: JavascriptDB) -> *MinusMinusToken { for (tmp in Token(db)) { if (isMinusMinusToken(Node {id: tmp.id})) { yield MinusMinusToken { @@ -632,7 +632,7 @@ schema LessThanLessThanToken extends Token { impl LessThanLessThanToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LessThanLessThanToken { + pub fn __all__(db: JavascriptDB) -> *LessThanLessThanToken { for (tmp in Token(db)) { if (isLessThanLessThanToken(Node {id: tmp.id})) { yield LessThanLessThanToken { @@ -652,7 +652,7 @@ schema GreaterThanGreaterThanToken extends Token { impl GreaterThanGreaterThanToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanToken { + pub fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanToken { for (tmp in Token(db)) { if (isGreaterThanGreaterThanToken(Node {id: tmp.id})) { yield GreaterThanGreaterThanToken { @@ -672,7 +672,7 @@ schema GreaterThanGreaterThanGreaterThanToken extends Token { impl GreaterThanGreaterThanGreaterThanToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanGreaterThanToken { + pub fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanGreaterThanToken { for (tmp in Token(db)) { if (isGreaterThanGreaterThanGreaterThanToken(Node {id: tmp.id})) { yield GreaterThanGreaterThanGreaterThanToken { @@ -692,7 +692,7 @@ schema AmpersandToken extends Token { impl AmpersandToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AmpersandToken { + pub fn __all__(db: JavascriptDB) -> *AmpersandToken { for (tmp in Token(db)) { if (isAmpersandToken(Node {id: tmp.id})) { yield AmpersandToken { @@ -712,7 +712,7 @@ schema BarToken extends Token { impl BarToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BarToken { + pub fn __all__(db: JavascriptDB) -> *BarToken { for (tmp in Token(db)) { if (isBarToken(Node {id: tmp.id})) { yield BarToken { @@ -732,7 +732,7 @@ schema CaretToken extends Token { impl CaretToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CaretToken { + pub fn __all__(db: JavascriptDB) -> *CaretToken { for (tmp in Token(db)) { if (isCaretToken(Node {id: tmp.id})) { yield CaretToken { @@ -752,7 +752,7 @@ schema ExclamationToken extends Token { impl ExclamationToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExclamationToken { + pub fn __all__(db: JavascriptDB) -> *ExclamationToken { for (tmp in Token(db)) { if (isExclamationToken(Node {id: tmp.id})) { yield ExclamationToken { @@ -772,7 +772,7 @@ schema TildeToken extends Token { impl TildeToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TildeToken { + pub fn __all__(db: JavascriptDB) -> *TildeToken { for (tmp in Token(db)) { if (isTildeToken(Node {id: tmp.id})) { yield TildeToken { @@ -792,7 +792,7 @@ schema AmpersandAmpersandToken extends Token { impl AmpersandAmpersandToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AmpersandAmpersandToken { + pub fn __all__(db: JavascriptDB) -> *AmpersandAmpersandToken { for (tmp in Token(db)) { if (isAmpersandAmpersandToken(Node {id: tmp.id})) { yield AmpersandAmpersandToken { @@ -812,7 +812,7 @@ schema BarBarToken extends Token { impl BarBarToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BarBarToken { + pub fn __all__(db: JavascriptDB) -> *BarBarToken { for (tmp in Token(db)) { if (isBarBarToken(Node {id: tmp.id})) { yield BarBarToken { @@ -832,7 +832,7 @@ schema QuestionToken extends Token { impl QuestionToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *QuestionToken { + pub fn __all__(db: JavascriptDB) -> *QuestionToken { for (tmp in Token(db)) { if (isQuestionToken(Node {id: tmp.id})) { yield QuestionToken { @@ -852,7 +852,7 @@ schema QuestionQuestionToken extends Token { impl QuestionQuestionToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *QuestionQuestionToken { + pub fn __all__(db: JavascriptDB) -> *QuestionQuestionToken { for (tmp in Token(db)) { if (isQuestionQuestionToken(Node {id: tmp.id})) { yield QuestionQuestionToken { @@ -872,7 +872,7 @@ schema EqualsToken extends Token { impl EqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EqualsToken { + pub fn __all__(db: JavascriptDB) -> *EqualsToken { for (tmp in Token(db)) { if (isEqualsToken(Node {id: tmp.id})) { yield EqualsToken { @@ -892,7 +892,7 @@ schema PlusEqualsToken extends Token { impl PlusEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PlusEqualsToken { + pub fn __all__(db: JavascriptDB) -> *PlusEqualsToken { for (tmp in Token(db)) { if (isPlusEqualsToken(Node {id: tmp.id})) { yield PlusEqualsToken { @@ -912,7 +912,7 @@ schema MinusEqualsToken extends Token { impl MinusEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MinusEqualsToken { + pub fn __all__(db: JavascriptDB) -> *MinusEqualsToken { for (tmp in Token(db)) { if (isMinusEqualsToken(Node {id: tmp.id})) { yield MinusEqualsToken { @@ -932,7 +932,7 @@ schema AsteriskEqualsToken extends Token { impl AsteriskEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AsteriskEqualsToken { + pub fn __all__(db: JavascriptDB) -> *AsteriskEqualsToken { for (tmp in Token(db)) { if (isAsteriskEqualsToken(Node {id: tmp.id})) { yield AsteriskEqualsToken { @@ -952,7 +952,7 @@ schema AsteriskAsteriskEqualsToken extends Token { impl AsteriskAsteriskEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AsteriskAsteriskEqualsToken { + pub fn __all__(db: JavascriptDB) -> *AsteriskAsteriskEqualsToken { for (tmp in Token(db)) { if (isAsteriskAsteriskEqualsToken(Node {id: tmp.id})) { yield AsteriskAsteriskEqualsToken { @@ -972,7 +972,7 @@ schema SlashEqualsToken extends Token { impl SlashEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SlashEqualsToken { + pub fn __all__(db: JavascriptDB) -> *SlashEqualsToken { for (tmp in Token(db)) { if (isSlashEqualsToken(Node {id: tmp.id})) { yield SlashEqualsToken { @@ -992,7 +992,7 @@ schema PercentEqualsToken extends Token { impl PercentEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PercentEqualsToken { + pub fn __all__(db: JavascriptDB) -> *PercentEqualsToken { for (tmp in Token(db)) { if (isPercentEqualsToken(Node {id: tmp.id})) { yield PercentEqualsToken { @@ -1012,7 +1012,7 @@ schema LessThanLessThanEqualsToken extends Token { impl LessThanLessThanEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LessThanLessThanEqualsToken { + pub fn __all__(db: JavascriptDB) -> *LessThanLessThanEqualsToken { for (tmp in Token(db)) { if (isLessThanLessThanEqualsToken(Node {id: tmp.id})) { yield LessThanLessThanEqualsToken { @@ -1032,7 +1032,7 @@ schema GreaterThanGreaterThanEqualsToken extends Token { impl GreaterThanGreaterThanEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanEqualsToken { + pub fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanEqualsToken { for (tmp in Token(db)) { if (isGreaterThanGreaterThanEqualsToken(Node {id: tmp.id})) { yield GreaterThanGreaterThanEqualsToken { @@ -1052,7 +1052,7 @@ schema GreaterThanGreaterThanGreaterThanEqualsToken extends Token { impl GreaterThanGreaterThanGreaterThanEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanGreaterThanEqualsToken { + pub fn __all__(db: JavascriptDB) -> *GreaterThanGreaterThanGreaterThanEqualsToken { for (tmp in Token(db)) { if (isGreaterThanGreaterThanGreaterThanEqualsToken(Node {id: tmp.id})) { yield GreaterThanGreaterThanGreaterThanEqualsToken { @@ -1072,7 +1072,7 @@ schema AmpersandEqualsToken extends Token { impl AmpersandEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AmpersandEqualsToken { + pub fn __all__(db: JavascriptDB) -> *AmpersandEqualsToken { for (tmp in Token(db)) { if (isAmpersandEqualsToken(Node {id: tmp.id})) { yield AmpersandEqualsToken { @@ -1092,7 +1092,7 @@ schema BarEqualsToken extends Token { impl BarEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BarEqualsToken { + pub fn __all__(db: JavascriptDB) -> *BarEqualsToken { for (tmp in Token(db)) { if (isBarEqualsToken(Node {id: tmp.id})) { yield BarEqualsToken { @@ -1112,7 +1112,7 @@ schema BarBarEqualsToken extends Token { impl BarBarEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BarBarEqualsToken { + pub fn __all__(db: JavascriptDB) -> *BarBarEqualsToken { for (tmp in Token(db)) { if (isBarBarEqualsToken(Node {id: tmp.id})) { yield BarBarEqualsToken { @@ -1132,7 +1132,7 @@ schema AmpersandAmpersandEqualsToken extends Token { impl AmpersandAmpersandEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AmpersandAmpersandEqualsToken { + pub fn __all__(db: JavascriptDB) -> *AmpersandAmpersandEqualsToken { for (tmp in Token(db)) { if (isAmpersandAmpersandEqualsToken(Node {id: tmp.id})) { yield AmpersandAmpersandEqualsToken { @@ -1152,7 +1152,7 @@ schema QuestionQuestionEqualsToken extends Token { impl QuestionQuestionEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *QuestionQuestionEqualsToken { + pub fn __all__(db: JavascriptDB) -> *QuestionQuestionEqualsToken { for (tmp in Token(db)) { if (isQuestionQuestionEqualsToken(Node {id: tmp.id})) { yield QuestionQuestionEqualsToken { @@ -1172,7 +1172,7 @@ schema CaretEqualsToken extends Token { impl CaretEqualsToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CaretEqualsToken { + pub fn __all__(db: JavascriptDB) -> *CaretEqualsToken { for (tmp in Token(db)) { if (isCaretEqualsToken(Node {id: tmp.id})) { yield CaretEqualsToken { @@ -1192,7 +1192,7 @@ schema IdentifierToken extends Token { impl IdentifierToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IdentifierToken { + pub fn __all__(db: JavascriptDB) -> *IdentifierToken { for (tmp in Token(db)) { if (isIdentifier(Node {id: tmp.id})) { yield IdentifierToken { @@ -1212,7 +1212,7 @@ schema PrivateIdentifierToken extends Token { impl PrivateIdentifierToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrivateIdentifierToken { + pub fn __all__(db: JavascriptDB) -> *PrivateIdentifierToken { for (tmp in Token(db)) { if (isPrivateIdentifier(Node {id: tmp.id})) { yield PrivateIdentifierToken { @@ -1232,7 +1232,7 @@ schema ExtendsKeyword extends Token { impl ExtendsKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExtendsKeyword { + pub fn __all__(db: JavascriptDB) -> *ExtendsKeyword { for (tmp in Token(db)) { if (isExtendsKeyword(Node {id: tmp.id})) { yield ExtendsKeyword { @@ -1252,7 +1252,7 @@ schema FalseKeyword extends Token { impl FalseKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FalseKeyword { + pub fn __all__(db: JavascriptDB) -> *FalseKeyword { for (tmp in Token(db)) { if (isFalseKeyword(Node {id: tmp.id})) { yield FalseKeyword { @@ -1272,7 +1272,7 @@ schema ImportKeyword extends Token { impl ImportKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportKeyword { + pub fn __all__(db: JavascriptDB) -> *ImportKeyword { for (tmp in Token(db)) { if (isImportKeyword(Node {id: tmp.id})) { yield ImportKeyword { @@ -1292,7 +1292,7 @@ schema InKeyword extends Token { impl InKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InKeyword { + pub fn __all__(db: JavascriptDB) -> *InKeyword { for (tmp in Token(db)) { if (isInKeyword(Node {id: tmp.id})) { yield InKeyword { @@ -1312,7 +1312,7 @@ schema InstanceOfKeyword extends Token { impl InstanceOfKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InstanceOfKeyword { + pub fn __all__(db: JavascriptDB) -> *InstanceOfKeyword { for (tmp in Token(db)) { if (isInstanceOfKeyword(Node {id: tmp.id})) { yield InstanceOfKeyword { @@ -1332,7 +1332,7 @@ schema NullKeyword extends Token { impl NullKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NullKeyword { + pub fn __all__(db: JavascriptDB) -> *NullKeyword { for (tmp in Token(db)) { if (isNullKeyword(Node {id: tmp.id})) { yield NullKeyword { @@ -1352,7 +1352,7 @@ schema SuperKeyword extends Token { impl SuperKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SuperKeyword { + pub fn __all__(db: JavascriptDB) -> *SuperKeyword { for (tmp in Token(db)) { if (isSuperKeyword(Node {id: tmp.id})) { yield SuperKeyword { @@ -1372,7 +1372,7 @@ schema ThisKeyword extends Token { impl ThisKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ThisKeyword { + pub fn __all__(db: JavascriptDB) -> *ThisKeyword { for (tmp in Token(db)) { if (isThisKeyword(Node {id: tmp.id})) { yield ThisKeyword { @@ -1392,7 +1392,7 @@ schema TrueKeyword extends Token { impl TrueKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TrueKeyword { + pub fn __all__(db: JavascriptDB) -> *TrueKeyword { for (tmp in Token(db)) { if (isTrueKeyword(Node {id: tmp.id})) { yield TrueKeyword { @@ -1412,7 +1412,7 @@ schema VoidKeyword extends Token { impl VoidKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *VoidKeyword { + pub fn __all__(db: JavascriptDB) -> *VoidKeyword { for (tmp in Token(db)) { if (isVoidKeyword(Node {id: tmp.id})) { yield VoidKeyword { @@ -1432,7 +1432,7 @@ schema ImplementsKeyword extends Token { impl ImplementsKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImplementsKeyword { + pub fn __all__(db: JavascriptDB) -> *ImplementsKeyword { for (tmp in Token(db)) { if (isImplementsKeyword(Node {id: tmp.id})) { yield ImplementsKeyword { @@ -1452,7 +1452,7 @@ schema AnyKeyword extends Token { impl AnyKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AnyKeyword { + pub fn __all__(db: JavascriptDB) -> *AnyKeyword { for (tmp in Token(db)) { if (isAnyKeyword(Node {id: tmp.id})) { yield AnyKeyword { @@ -1472,7 +1472,7 @@ schema AwaitKeyword extends Token { impl AwaitKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AwaitKeyword { + pub fn __all__(db: JavascriptDB) -> *AwaitKeyword { for (tmp in Token(db)) { if (isAwaitKeyword(Node {id: tmp.id})) { yield AwaitKeyword { @@ -1492,7 +1492,7 @@ schema BooleanKeyword extends Token { impl BooleanKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BooleanKeyword { + pub fn __all__(db: JavascriptDB) -> *BooleanKeyword { for (tmp in Token(db)) { if (isBooleanKeyword(Node {id: tmp.id})) { yield BooleanKeyword { @@ -1512,7 +1512,7 @@ schema IntrinsicKeyword extends Token { impl IntrinsicKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IntrinsicKeyword { + pub fn __all__(db: JavascriptDB) -> *IntrinsicKeyword { for (tmp in Token(db)) { if (isIntrinsicKeyword(Node {id: tmp.id})) { yield IntrinsicKeyword { @@ -1532,7 +1532,7 @@ schema NeverKeyword extends Token { impl NeverKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NeverKeyword { + pub fn __all__(db: JavascriptDB) -> *NeverKeyword { for (tmp in Token(db)) { if (isNeverKeyword(Node {id: tmp.id})) { yield NeverKeyword { @@ -1552,7 +1552,7 @@ schema NumberKeyword extends Token { impl NumberKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NumberKeyword { + pub fn __all__(db: JavascriptDB) -> *NumberKeyword { for (tmp in Token(db)) { if (isNumberKeyword(Node {id: tmp.id})) { yield NumberKeyword { @@ -1572,7 +1572,7 @@ schema ObjectKeyword extends Token { impl ObjectKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ObjectKeyword { + pub fn __all__(db: JavascriptDB) -> *ObjectKeyword { for (tmp in Token(db)) { if (isObjectKeyword(Node {id: tmp.id})) { yield ObjectKeyword { @@ -1592,7 +1592,7 @@ schema StringKeyword extends Token { impl StringKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *StringKeyword { + pub fn __all__(db: JavascriptDB) -> *StringKeyword { for (tmp in Token(db)) { if (isStringKeyword(Node {id: tmp.id})) { yield StringKeyword { @@ -1612,7 +1612,7 @@ schema SymbolKeyword extends Token { impl SymbolKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *SymbolKeyword { + pub fn __all__(db: JavascriptDB) -> *SymbolKeyword { for (tmp in Token(db)) { if (isSymbolKeyword(Node {id: tmp.id})) { yield SymbolKeyword { @@ -1632,7 +1632,7 @@ schema UndefinedKeyword extends Token { impl UndefinedKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UndefinedKeyword { + pub fn __all__(db: JavascriptDB) -> *UndefinedKeyword { for (tmp in Token(db)) { if (isUndefinedKeyword(Node {id: tmp.id})) { yield UndefinedKeyword { @@ -1652,7 +1652,7 @@ schema UnknownKeyword extends Token { impl UnknownKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnknownKeyword { + pub fn __all__(db: JavascriptDB) -> *UnknownKeyword { for (tmp in Token(db)) { if (isUnknownKeyword(Node {id: tmp.id})) { yield UnknownKeyword { @@ -1672,7 +1672,7 @@ schema BigIntKeyword extends Token { impl BigIntKeyword { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BigIntKeyword { + pub fn __all__(db: JavascriptDB) -> *BigIntKeyword { for (tmp in Token(db)) { if (isBigIntKeyword(Node {id: tmp.id})) { yield BigIntKeyword { @@ -1692,7 +1692,7 @@ schema PrefixUnaryOperator extends Token { impl PrefixUnaryOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PrefixUnaryOperator { + pub fn __all__(db: JavascriptDB) -> *PrefixUnaryOperator { for (tmp in Token(db)) { if (isPrefixUnaryOperator(Node {id: tmp.id})) { yield PrefixUnaryOperator { @@ -1712,7 +1712,7 @@ schema PostfixUnaryOperator extends Token { impl PostfixUnaryOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PostfixUnaryOperator { + pub fn __all__(db: JavascriptDB) -> *PostfixUnaryOperator { for (tmp in Token(db)) { if (isPostfixUnaryOperator(Node {id: tmp.id})) { yield PostfixUnaryOperator { @@ -1732,7 +1732,7 @@ schema UpdateOperator extends Token { impl UpdateOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UpdateOperator { + pub fn __all__(db: JavascriptDB) -> *UpdateOperator { for (tmp in Token(db)) { if (isUpdateOperator(Node {id: tmp.id})) { yield UpdateOperator { @@ -1752,7 +1752,7 @@ schema ExponentiationOperator extends Token { impl ExponentiationOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExponentiationOperator { + pub fn __all__(db: JavascriptDB) -> *ExponentiationOperator { for (tmp in Token(db)) { if (isExponentiationOperator(Node {id: tmp.id})) { yield ExponentiationOperator { @@ -1772,7 +1772,7 @@ schema MultiplicativeOperator extends Token { impl MultiplicativeOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MultiplicativeOperator { + pub fn __all__(db: JavascriptDB) -> *MultiplicativeOperator { for (tmp in Token(db)) { if (isMultiplicativeOperator(Node {id: tmp.id})) { yield MultiplicativeOperator { @@ -1792,7 +1792,7 @@ schema AdditiveOperator extends Token { impl AdditiveOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AdditiveOperator { + pub fn __all__(db: JavascriptDB) -> *AdditiveOperator { for (tmp in Token(db)) { if (isAdditiveOperator(Node {id: tmp.id})) { yield AdditiveOperator { @@ -1812,7 +1812,7 @@ schema ShiftOperator extends Token { impl ShiftOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ShiftOperator { + pub fn __all__(db: JavascriptDB) -> *ShiftOperator { for (tmp in Token(db)) { if (isShiftOperator(Node {id: tmp.id})) { yield ShiftOperator { @@ -1832,7 +1832,7 @@ schema RelationalOperator extends Token { impl RelationalOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RelationalOperator { + pub fn __all__(db: JavascriptDB) -> *RelationalOperator { for (tmp in Token(db)) { if (isRelationalOperator(Node {id: tmp.id})) { yield RelationalOperator { @@ -1852,7 +1852,7 @@ schema EqualityOperator extends Token { impl EqualityOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *EqualityOperator { + pub fn __all__(db: JavascriptDB) -> *EqualityOperator { for (tmp in Token(db)) { if (isEqualityOperator(Node {id: tmp.id})) { yield EqualityOperator { @@ -1872,7 +1872,7 @@ schema BinaryBitwiseOperator extends Token { impl BinaryBitwiseOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BinaryBitwiseOperator { + pub fn __all__(db: JavascriptDB) -> *BinaryBitwiseOperator { for (tmp in Token(db)) { if (isBinaryBitwiseOperator(Node {id: tmp.id})) { yield BinaryBitwiseOperator { @@ -1892,7 +1892,7 @@ schema BinaryLogicalOperator extends Token { impl BinaryLogicalOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BinaryLogicalOperator { + pub fn __all__(db: JavascriptDB) -> *BinaryLogicalOperator { for (tmp in Token(db)) { if (isBinaryLogicalOperator(Node {id: tmp.id})) { yield BinaryLogicalOperator { @@ -1914,7 +1914,7 @@ schema CompoundAssignmentOperator extends Token { impl CompoundAssignmentOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CompoundAssignmentOperator { + pub fn __all__(db: JavascriptDB) -> *CompoundAssignmentOperator { for (tmp in Token(db)) { if (isCompoundAssignmentOperator(Node {id: tmp.id})) { yield CompoundAssignmentOperator { @@ -1934,7 +1934,7 @@ schema AssignmentOperator extends Token { impl AssignmentOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *AssignmentOperator { + pub fn __all__(db: JavascriptDB) -> *AssignmentOperator { for (tmp in Token(db)) { if (isAssignmentOperator(Node {id: tmp.id})) { yield AssignmentOperator { @@ -1954,7 +1954,7 @@ schema BinaryOperator extends Token { impl BinaryOperator { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *BinaryOperator { + pub fn __all__(db: JavascriptDB) -> *BinaryOperator { for (tmp in Token(db)) { if (isBinaryOperator(Node {id: tmp.id})) { yield BinaryOperator { @@ -1974,7 +1974,7 @@ schema KeywordToken extends Token { impl KeywordToken { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *KeywordToken { + pub fn __all__(db: JavascriptDB) -> *KeywordToken { for (tmp in Token(db)) { if (isKeywordToken(Node {id: tmp.id})) { yield KeywordToken { diff --git a/language/javascript/lib/TopLevel.gdl b/language/javascript/lib/TopLevel.gdl index d9f5c9b8..b2cc63d4 100644 --- a/language/javascript/lib/TopLevel.gdl +++ b/language/javascript/lib/TopLevel.gdl @@ -9,7 +9,7 @@ schema TopLevel extends TopLevelDO { impl TopLevel { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TopLevel { + pub fn __all__(db: JavascriptDB) -> *TopLevel { for (tmp in TopLevelDO(db)) { yield TopLevel { oid : tmp.oid, diff --git a/language/javascript/lib/Type.gdl b/language/javascript/lib/Type.gdl index 91e24350..80bcd677 100644 --- a/language/javascript/lib/Type.gdl +++ b/language/javascript/lib/Type.gdl @@ -12,7 +12,7 @@ schema TypeNode extends Node { impl TypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeNode { + pub fn __all__(db: JavascriptDB) -> *TypeNode { for (tmp in Node(db)) { if (isTypeNode(tmp)) { yield TypeNode { @@ -32,7 +32,7 @@ schema KeywordTypeNode extends TypeNode { impl KeywordTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *KeywordTypeNode { + pub fn __all__(db: JavascriptDB) -> *KeywordTypeNode { for (tmp in TypeNode(db)) { if (isKeywordTypeNode(Node {id: tmp.id})) { yield KeywordTypeNode { @@ -52,7 +52,7 @@ schema TypePredicateNode extends TypeNode { impl TypePredicateNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypePredicateNode { + pub fn __all__(db: JavascriptDB) -> *TypePredicateNode { for (tmp in TypeNode(db)) { if (isTypePredicate(Node {id: tmp.id})) { yield TypePredicateNode { @@ -72,7 +72,7 @@ schema FunctionTypeNode extends TypeNode { impl FunctionTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *FunctionTypeNode { + pub fn __all__(db: JavascriptDB) -> *FunctionTypeNode { for (tmp in TypeNode(db)) { if (isFunctionType(Node {id: tmp.id})) { yield FunctionTypeNode { @@ -92,7 +92,7 @@ schema ConstructorTypeNode extends TypeNode { impl ConstructorTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConstructorTypeNode { + pub fn __all__(db: JavascriptDB) -> *ConstructorTypeNode { for (tmp in TypeNode(db)) { if (isConstructorType(Node {id: tmp.id})) { yield ConstructorTypeNode { @@ -112,7 +112,7 @@ schema TypeQueryNode extends TypeNode { impl TypeQueryNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeQueryNode { + pub fn __all__(db: JavascriptDB) -> *TypeQueryNode { for (tmp in TypeNode(db)) { if (isTypeQuery(Node {id: tmp.id})) { yield TypeQueryNode { @@ -132,7 +132,7 @@ schema TypeLiteralNode extends TypeNode { impl TypeLiteralNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeLiteralNode { + pub fn __all__(db: JavascriptDB) -> *TypeLiteralNode { for (tmp in TypeNode(db)) { if (isTypeLiteral(Node {id: tmp.id})) { yield TypeLiteralNode { @@ -152,7 +152,7 @@ schema ArrayTypeNode extends TypeNode { impl ArrayTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ArrayTypeNode { + pub fn __all__(db: JavascriptDB) -> *ArrayTypeNode { for (tmp in TypeNode(db)) { if (isArrayType(Node {id: tmp.id})) { yield ArrayTypeNode { @@ -172,7 +172,7 @@ schema TupleTypeNode extends TypeNode { impl TupleTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TupleTypeNode { + pub fn __all__(db: JavascriptDB) -> *TupleTypeNode { for (tmp in TypeNode(db)) { if (isTupleType(Node {id: tmp.id})) { yield TupleTypeNode { @@ -192,7 +192,7 @@ schema OptionalTypeNode extends TypeNode { impl OptionalTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *OptionalTypeNode { + pub fn __all__(db: JavascriptDB) -> *OptionalTypeNode { for (tmp in TypeNode(db)) { if (isOptionalType(Node {id: tmp.id})) { yield OptionalTypeNode { @@ -212,7 +212,7 @@ schema RestTypeNode extends TypeNode { impl RestTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *RestTypeNode { + pub fn __all__(db: JavascriptDB) -> *RestTypeNode { for (tmp in TypeNode(db)) { if (isRestType(Node {id: tmp.id})) { yield RestTypeNode { @@ -232,7 +232,7 @@ schema UnionTypeNode extends TypeNode { impl UnionTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *UnionTypeNode { + pub fn __all__(db: JavascriptDB) -> *UnionTypeNode { for (tmp in TypeNode(db)) { if (isUnionType(Node {id: tmp.id})) { yield UnionTypeNode { @@ -270,7 +270,7 @@ schema IntersectionTypeNode extends TypeNode { impl IntersectionTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IntersectionTypeNode { + pub fn __all__(db: JavascriptDB) -> *IntersectionTypeNode { for (tmp in TypeNode(db)) { if (isIntersectionType(Node {id: tmp.id})) { yield IntersectionTypeNode { @@ -308,7 +308,7 @@ schema ConditionalTypeNode extends TypeNode { impl ConditionalTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConditionalTypeNode { + pub fn __all__(db: JavascriptDB) -> *ConditionalTypeNode { for (tmp in TypeNode(db)) { if (isConditionalType(Node {id: tmp.id})) { yield ConditionalTypeNode { @@ -360,7 +360,7 @@ schema InferTypeNode extends TypeNode { impl InferTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *InferTypeNode { + pub fn __all__(db: JavascriptDB) -> *InferTypeNode { for (tmp in TypeNode(db)) { if (isInferType(Node {id: tmp.id})) { yield InferTypeNode { @@ -380,7 +380,7 @@ schema ParenthesizedTypeNode extends TypeNode { impl ParenthesizedTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ParenthesizedTypeNode { + pub fn __all__(db: JavascriptDB) -> *ParenthesizedTypeNode { for (tmp in TypeNode(db)) { if (isParenthesizedType(Node {id: tmp.id})) { yield ParenthesizedTypeNode { @@ -400,7 +400,7 @@ schema ThisTypeNode extends TypeNode { impl ThisTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ThisTypeNode { + pub fn __all__(db: JavascriptDB) -> *ThisTypeNode { for (tmp in TypeNode(db)) { if (isThisType(Node {id: tmp.id})) { yield ThisTypeNode { @@ -420,7 +420,7 @@ schema TypeOperatorNode extends TypeNode { impl TypeOperatorNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeOperatorNode { + pub fn __all__(db: JavascriptDB) -> *TypeOperatorNode { for (tmp in TypeNode(db)) { if (isTypeOperator(Node {id: tmp.id})) { yield TypeOperatorNode { @@ -456,7 +456,7 @@ schema IndexedAccessTypeNode extends TypeNode { impl IndexedAccessTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IndexedAccessTypeNode { + pub fn __all__(db: JavascriptDB) -> *IndexedAccessTypeNode { for (tmp in TypeNode(db)) { if (isIndexedAccessType(Node {id: tmp.id})) { yield IndexedAccessTypeNode { @@ -492,7 +492,7 @@ schema MappedTypeNode extends TypeNode { impl MappedTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MappedTypeNode { + pub fn __all__(db: JavascriptDB) -> *MappedTypeNode { for (tmp in TypeNode(db)) { if (isMappedType(Node {id: tmp.id})) { yield MappedTypeNode { @@ -512,7 +512,7 @@ schema LiteralTypeNode extends TypeNode { impl LiteralTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *LiteralTypeNode { + pub fn __all__(db: JavascriptDB) -> *LiteralTypeNode { for (tmp in TypeNode(db)) { if (isLiteralType(Node {id: tmp.id})) { yield LiteralTypeNode { @@ -549,7 +549,7 @@ schema NamedTupleMember extends TypeNode { impl NamedTupleMember { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NamedTupleMember { + pub fn __all__(db: JavascriptDB) -> *NamedTupleMember { for (tmp in TypeNode(db)) { if (isNamedTupleMember(Node {id: tmp.id})) { yield NamedTupleMember { @@ -569,7 +569,7 @@ schema TemplateLiteralTypeNode extends TypeNode { impl TemplateLiteralTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateLiteralTypeNode { + pub fn __all__(db: JavascriptDB) -> *TemplateLiteralTypeNode { for (tmp in TypeNode(db)) { if (isTemplateLiteralType(Node {id: tmp.id})) { yield TemplateLiteralTypeNode { @@ -619,7 +619,7 @@ schema TemplateLiteralTypeSpan extends TypeNode { impl TemplateLiteralTypeSpan { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TemplateLiteralTypeSpan { + pub fn __all__(db: JavascriptDB) -> *TemplateLiteralTypeSpan { for (tmp in TypeNode(db)) { if (isTemplateLiteralTypeSpan(Node {id: tmp.id})) { yield TemplateLiteralTypeSpan { @@ -639,7 +639,7 @@ schema NodeWithTypeArguments extends TypeNode { impl NodeWithTypeArguments { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *NodeWithTypeArguments { + pub fn __all__(db: JavascriptDB) -> *NodeWithTypeArguments { for (tmp in TypeNode(db)) { if (isNodeWithTypeArguments(Node {id: tmp.id})) { yield NodeWithTypeArguments { @@ -659,7 +659,7 @@ schema TypeReferenceNode extends NodeWithTypeArguments { impl TypeReferenceNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeReferenceNode { + pub fn __all__(db: JavascriptDB) -> *TypeReferenceNode { for (tmp in NodeWithTypeArguments(db)) { if (isTypeReference(Node {id: tmp.id})) { yield TypeReferenceNode { @@ -690,7 +690,7 @@ schema ImportTypeNode extends NodeWithTypeArguments { impl ImportTypeNode { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ImportTypeNode { + pub fn __all__(db: JavascriptDB) -> *ImportTypeNode { for (tmp in NodeWithTypeArguments(db)) { if (isImportType(Node {id: tmp.id})) { yield ImportTypeNode { @@ -710,7 +710,7 @@ schema ExpressionWithTypeArguments extends NodeWithTypeArguments { impl ExpressionWithTypeArguments { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ExpressionWithTypeArguments { + pub fn __all__(db: JavascriptDB) -> *ExpressionWithTypeArguments { for (tmp in NodeWithTypeArguments(db)) { if (isExpressionWithTypeArguments(Node {id: tmp.id})) { yield ExpressionWithTypeArguments { @@ -730,7 +730,7 @@ schema TypeElement extends Node { impl TypeElement { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *TypeElement { + pub fn __all__(db: JavascriptDB) -> *TypeElement { for (tmp in Node(db)) { if (isTypeElement(tmp)) { yield TypeElement { @@ -750,7 +750,7 @@ schema PropertySignature extends TypeElement { impl PropertySignature { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *PropertySignature { + pub fn __all__(db: JavascriptDB) -> *PropertySignature { for (tmp in TypeElement(db)) { if (isPropertySignature(Node {id: tmp.id})) { yield PropertySignature { @@ -770,7 +770,7 @@ schema MethodSignature extends TypeElement { impl MethodSignature { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *MethodSignature { + pub fn __all__(db: JavascriptDB) -> *MethodSignature { for (tmp in TypeElement(db)) { if (isMethodSignature(Node {id: tmp.id})) { yield MethodSignature { @@ -790,7 +790,7 @@ schema CallSignatureDeclaration extends TypeElement { impl CallSignatureDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *CallSignatureDeclaration { + pub fn __all__(db: JavascriptDB) -> *CallSignatureDeclaration { for (tmp in TypeElement(db)) { if (isCallSignature(Node {id: tmp.id})) { yield CallSignatureDeclaration { @@ -810,7 +810,7 @@ schema ConstructSignatureDeclaration extends TypeElement { impl ConstructSignatureDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *ConstructSignatureDeclaration { + pub fn __all__(db: JavascriptDB) -> *ConstructSignatureDeclaration { for (tmp in TypeElement(db)) { if (isConstructSignature(Node {id: tmp.id})) { yield ConstructSignatureDeclaration { @@ -830,7 +830,7 @@ schema IndexSignatureDeclaration extends TypeElement { impl IndexSignatureDeclaration { @data_constraint @inline - fn __all__(db: JavascriptDB) -> *IndexSignatureDeclaration { + pub fn __all__(db: JavascriptDB) -> *IndexSignatureDeclaration { for (tmp in TypeElement(db)) { if (isIndexSignature(Node {id: tmp.id})) { yield IndexSignatureDeclaration { diff --git a/language/python/lib/Alias.gdl b/language/python/lib/Alias.gdl index f94aa2ab..33002c45 100644 --- a/language/python/lib/Alias.gdl +++ b/language/python/lib/Alias.gdl @@ -7,7 +7,7 @@ schema Alias extends AliasDO { impl Alias { @data_constraint @inline - fn __all__(db: PythonDB) -> *Alias { + pub fn __all__(db: PythonDB) -> *Alias { for (tmp in AliasDO(db)) { yield Alias { element_oid : tmp.element_oid, diff --git a/language/python/lib/Argument.gdl b/language/python/lib/Argument.gdl index 7c8f5143..8b8012a8 100644 --- a/language/python/lib/Argument.gdl +++ b/language/python/lib/Argument.gdl @@ -7,7 +7,7 @@ schema Arg extends ArgDO { impl Arg { @data_constraint @inline - fn __all__(db: PythonDB) -> *Arg { + pub fn __all__(db: PythonDB) -> *Arg { for (tmp in ArgDO(db)) { yield Arg { element_oid : tmp.element_oid, @@ -73,7 +73,7 @@ schema Arguments extends ArgumentsDO { impl Arguments { @data_constraint @inline - fn __all__(db: PythonDB) -> *Arguments { + pub fn __all__(db: PythonDB) -> *Arguments { for (tmp in ArgumentsDO(db)) { yield Arguments { element_oid : tmp.element_oid, diff --git a/language/python/lib/Class.gdl b/language/python/lib/Class.gdl index 92f5d517..a5e105f2 100644 --- a/language/python/lib/Class.gdl +++ b/language/python/lib/Class.gdl @@ -7,7 +7,7 @@ schema Class extends ClassDefStatement { impl Class { @data_constraint @inline - fn __all__(db: PythonDB) -> *Class { + pub fn __all__(db: PythonDB) -> *Class { for (tmp in ClassDefStatement(db)) { yield Class { element_oid : tmp.element_oid, @@ -146,7 +146,7 @@ schema ClassHierarchy extends ClassHierarchyDO { impl ClassHierarchy { @data_constraint @inline - fn __all__(db: PythonDB) -> *ClassHierarchy { + pub fn __all__(db: PythonDB) -> *ClassHierarchy { for (tmp in ClassHierarchyDO(db)) { yield ClassHierarchy { base_oid : tmp.base_oid, diff --git a/language/python/lib/Comprehension.gdl b/language/python/lib/Comprehension.gdl index db68de46..801aaa0e 100644 --- a/language/python/lib/Comprehension.gdl +++ b/language/python/lib/Comprehension.gdl @@ -7,7 +7,7 @@ schema Comprehension extends ComprehensionDO { impl Comprehension { @data_constraint @inline - fn __all__(db: PythonDB) -> *Comprehension { + pub fn __all__(db: PythonDB) -> *Comprehension { for (tmp in ComprehensionDO(db)) { yield Comprehension { element_oid : tmp.element_oid, diff --git a/language/python/lib/Container.gdl b/language/python/lib/Container.gdl index 026e7f73..9e7cc932 100644 --- a/language/python/lib/Container.gdl +++ b/language/python/lib/Container.gdl @@ -7,7 +7,7 @@ schema Program extends ProgramDO { impl Program { @data_constraint @inline - fn __all__(db: PythonDB) -> *Program { + pub fn __all__(db: PythonDB) -> *Program { for (tmp in ProgramDO(db)) { yield Program { program_oid : tmp.program_oid, @@ -25,7 +25,7 @@ schema File extends FileDO { impl File { @data_constraint @inline - fn __all__(db: PythonDB) -> *File { + pub fn __all__(db: PythonDB) -> *File { for (tmp in FileDO(db)) { yield File { element_oid : tmp.element_oid, @@ -71,7 +71,7 @@ schema Folder extends FolderDO { impl Folder { @data_constraint @inline - fn __all__(db: PythonDB) -> *Folder { + pub fn __all__(db: PythonDB) -> *Folder { for (tmp in FolderDO(db)) { yield Folder { element_oid : tmp.element_oid, @@ -116,7 +116,7 @@ schema ContainerParent extends ContainerParentDO { impl ContainerParent { @data_constraint @inline - fn __all__(db: PythonDB) -> *ContainerParent { + pub fn __all__(db: PythonDB) -> *ContainerParent { for (tmp in ContainerParentDO(db)) { yield ContainerParent { child_oid : tmp.child_oid, @@ -145,7 +145,7 @@ schema Module extends ModuleDO { impl Module { @data_constraint @inline - fn __all__(db: PythonDB) -> *Module { + pub fn __all__(db: PythonDB) -> *Module { for (tmp in ModuleDO(db)) { yield Module { element_oid : tmp.element_oid, @@ -198,7 +198,7 @@ schema Modified2To3File extends Modified2To3FileDO { impl Modified2To3File { @data_constraint @inline - fn __all__(db: PythonDB) -> *Modified2To3File { + pub fn __all__(db: PythonDB) -> *Modified2To3File { for (tmp in Modified2To3FileDO(db)) { yield Modified2To3File { element_oid : tmp.element_oid, @@ -216,7 +216,7 @@ schema ParseErrorFile extends ParseErrorFileDO { impl ParseErrorFile { @data_constraint @inline - fn __all__(db: PythonDB) -> *ParseErrorFile { + pub fn __all__(db: PythonDB) -> *ParseErrorFile { for (tmp in ParseErrorFileDO(db)) { yield ParseErrorFile { element_oid : tmp.element_oid, diff --git a/language/python/lib/DOClass.gdl b/language/python/lib/DOClass.gdl index 0feeb448..58837532 100644 --- a/language/python/lib/DOClass.gdl +++ b/language/python/lib/DOClass.gdl @@ -14,7 +14,7 @@ impl AliasDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AliasDO { - for (tmp in db.alias) { + for (tmp in db.alias) { yield AliasDO { element_oid : tmp.element_oid, name : tmp.name, @@ -24,7 +24,7 @@ impl AliasDO { location_oid : tmp.location_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the name of this element. @@ -82,14 +82,14 @@ impl AnnotationAssignmentStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AnnotationAssignmentStatementDO { - for (tmp in db.annotation_assignment_statement) { + for (tmp in db.annotation_assignment_statement) { yield AnnotationAssignmentStatementDO { element_oid : tmp.element_oid, annotation_oid : tmp.annotation_oid, target_oid : tmp.target_oid, is_simple : tmp.is_simple } - } + } } /** * @brief gets the annotation oid of this element. @@ -129,7 +129,7 @@ impl ArgDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ArgDO { - for (tmp in db.arg) { + for (tmp in db.arg) { yield ArgDO { element_oid : tmp.element_oid, annotation : tmp.annotation, @@ -138,7 +138,7 @@ impl ArgDO { location_oid : tmp.location_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the annotation of this element. @@ -188,13 +188,13 @@ impl ArgumentsDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ArgumentsDO { - for (tmp in db.arguments) { + for (tmp in db.arguments) { yield ArgumentsDO { element_oid : tmp.element_oid, parent_oid : tmp.parent_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the parent oid of this element. @@ -222,12 +222,12 @@ impl AssertStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AssertStatementDO { - for (tmp in db.assert_statement) { + for (tmp in db.assert_statement) { yield AssertStatementDO { element_oid : tmp.element_oid, assert_condition_oid : tmp.assert_condition_oid } - } + } } /** * @brief gets the assert condition oid of this element. @@ -249,13 +249,13 @@ impl AssignmentStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AssignmentStatementDO { - for (tmp in db.assignment_statement) { + for (tmp in db.assignment_statement) { yield AssignmentStatementDO { element_oid : tmp.element_oid, value_oid : tmp.value_oid, targets_size : tmp.targets_size } - } + } } /** * @brief gets the value oid of this element. @@ -282,11 +282,11 @@ impl AsyncForStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AsyncForStatementDO { - for (tmp in db.async_for_statement) { + for (tmp in db.async_for_statement) { yield AsyncForStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -300,12 +300,12 @@ impl AsyncFunctionDefStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AsyncFunctionDefStatementDO { - for (tmp in db.async_function_def_statement) { + for (tmp in db.async_function_def_statement) { yield AsyncFunctionDefStatementDO { element_oid : tmp.element_oid, name : tmp.name } - } + } } /** * @brief gets the name of this element. @@ -325,11 +325,11 @@ impl AsyncWithStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AsyncWithStatementDO { - for (tmp in db.async_with_statement) { + for (tmp in db.async_with_statement) { yield AsyncWithStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -344,13 +344,13 @@ impl AttributeExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AttributeExpressionDO { - for (tmp in db.attribute_expression) { + for (tmp in db.attribute_expression) { yield AttributeExpressionDO { element_oid : tmp.element_oid, value_oid : tmp.value_oid, ctx_type : tmp.ctx_type } - } + } } /** * @brief gets the value oid of this element. @@ -380,14 +380,14 @@ impl AugmentedAssignmentStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AugmentedAssignmentStatementDO { - for (tmp in db.augmented_assignment_statement) { + for (tmp in db.augmented_assignment_statement) { yield AugmentedAssignmentStatementDO { element_oid : tmp.element_oid, op_code : tmp.op_code, target_expr_oid : tmp.target_expr_oid, value_expr_oid : tmp.value_expr_oid } - } + } } /** * @brief gets the op code of this element. @@ -422,12 +422,12 @@ impl AwaitExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *AwaitExpressionDO { - for (tmp in db.await_expression) { + for (tmp in db.await_expression) { yield AwaitExpressionDO { element_oid : tmp.element_oid, expr_value_oid : tmp.expr_value_oid } - } + } } /** * @brief gets the expr value oid of this element. @@ -450,14 +450,14 @@ impl BinOpExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *BinOpExpressionDO { - for (tmp in db.bin_op_expression) { + for (tmp in db.bin_op_expression) { yield BinOpExpressionDO { element_oid : tmp.element_oid, left_expr_oid : tmp.left_expr_oid, opcode : tmp.opcode, right_expr_oid : tmp.right_expr_oid } - } + } } /** * @brief gets the left expr oid of this element. @@ -493,13 +493,13 @@ impl BooleanOpExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *BooleanOpExpressionDO { - for (tmp in db.boolean_op_expression) { + for (tmp in db.boolean_op_expression) { yield BooleanOpExpressionDO { element_oid : tmp.element_oid, type : tmp.type, size : tmp.size } - } + } } /** * @brief gets the type of this element. @@ -526,11 +526,11 @@ impl BreakStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *BreakStatementDO { - for (tmp in db.break_statement) { + for (tmp in db.break_statement) { yield BreakStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -544,12 +544,12 @@ impl CallExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *CallExpressionDO { - for (tmp in db.call_expression) { + for (tmp in db.call_expression) { yield CallExpressionDO { element_oid : tmp.element_oid, expr_func_oid : tmp.expr_func_oid } - } + } } /** * @brief gets the expr func oid of this element. @@ -570,12 +570,12 @@ impl CallableBindingDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *CallableBindingDO { - for (tmp in db.callable_binding) { + for (tmp in db.callable_binding) { yield CallableBindingDO { caller_oid : tmp.caller_oid, callee_oid : tmp.callee_oid } - } + } } /** * @brief gets the callee oid of this element. @@ -596,12 +596,12 @@ impl ClassDefStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ClassDefStatementDO { - for (tmp in db.class_def_statement) { + for (tmp in db.class_def_statement) { yield ClassDefStatementDO { element_oid : tmp.element_oid, name : tmp.name } - } + } } /** * @brief gets the name of this element. @@ -622,12 +622,12 @@ impl ClassHierarchyDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ClassHierarchyDO { - for (tmp in db.class_hierarchy) { + for (tmp in db.class_hierarchy) { yield ClassHierarchyDO { base_oid : tmp.base_oid, class_oid : tmp.class_oid } - } + } } /** * @brief gets the class oid of this element. @@ -650,14 +650,14 @@ impl CmpopDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *CmpopDO { - for (tmp in db.cmpop) { + for (tmp in db.cmpop) { yield CmpopDO { element_oid : tmp.element_oid, value : tmp.value, location_oid : tmp.location_oid, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the value of this element. @@ -694,14 +694,14 @@ impl CommentDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *CommentDO { - for (tmp in db.comment) { + for (tmp in db.comment) { yield CommentDO { element_oid : tmp.element_oid, text : tmp.text, parent_oid : tmp.parent_oid, location_oid : tmp.location_oid } - } + } } /** * @brief gets the text of this element. @@ -736,12 +736,12 @@ impl CompareExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *CompareExpressionDO { - for (tmp in db.compare_expression) { + for (tmp in db.compare_expression) { yield CompareExpressionDO { element_oid : tmp.element_oid, left_expr_oid : tmp.left_expr_oid } - } + } } /** * @brief gets the left expr oid of this element. @@ -766,7 +766,7 @@ impl ComprehensionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ComprehensionDO { - for (tmp in db.comprehension) { + for (tmp in db.comprehension) { yield ComprehensionDO { element_oid : tmp.element_oid, target_expr_oid : tmp.target_expr_oid, @@ -775,7 +775,7 @@ impl ComprehensionDO { parent_oid : tmp.parent_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the target expr oid of this element. @@ -824,12 +824,12 @@ impl ConstantDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ConstantDO { - for (tmp in db.constant) { + for (tmp in db.constant) { yield ConstantDO { element_oid : tmp.element_oid, value : tmp.value } - } + } } /** * @brief gets the value of this element. @@ -850,12 +850,12 @@ impl ContainerParentDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ContainerParentDO { - for (tmp in db.container_parent) { + for (tmp in db.container_parent) { yield ContainerParentDO { child_oid : tmp.child_oid, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the parent oid of this element. @@ -875,11 +875,11 @@ impl ContinueStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ContinueStatementDO { - for (tmp in db.continue_statement) { + for (tmp in db.continue_statement) { yield ContinueStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -893,12 +893,12 @@ impl DecoratedRelationDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *DecoratedRelationDO { - for (tmp in db.decorated_relation) { + for (tmp in db.decorated_relation) { yield DecoratedRelationDO { decorator_oid : tmp.decorator_oid, decorated_element_oid : tmp.decorated_element_oid } - } + } } /** * @brief gets the decorated element oid of this element. @@ -920,13 +920,13 @@ impl DecoratorDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *DecoratorDO { - for (tmp in db.decorator) { + for (tmp in db.decorator) { yield DecoratorDO { element_oid : tmp.element_oid, type : tmp.type, printable_text : tmp.printable_text } - } + } } /** * @brief gets the type of this element. @@ -954,12 +954,12 @@ impl DeleteStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *DeleteStatementDO { - for (tmp in db.delete_statement) { + for (tmp in db.delete_statement) { yield DeleteStatementDO { element_oid : tmp.element_oid, targets_size : tmp.targets_size } - } + } } /** * @brief gets the targets size of this element. @@ -980,12 +980,12 @@ impl DictCompExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *DictCompExpressionDO { - for (tmp in db.dict_comp_expression) { + for (tmp in db.dict_comp_expression) { yield DictCompExpressionDO { element_oid : tmp.element_oid, comprehension_size : tmp.comprehension_size } - } + } } /** * @brief gets the comprehension size of this element. @@ -1006,12 +1006,12 @@ impl DictExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *DictExpressionDO { - for (tmp in db.dict_expression) { + for (tmp in db.dict_expression) { yield DictExpressionDO { element_oid : tmp.element_oid, size : tmp.size } - } + } } /** * @brief gets the size of this element. @@ -1033,13 +1033,13 @@ impl DocstringCommentDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *DocstringCommentDO { - for (tmp in db.docstring_comment) { + for (tmp in db.docstring_comment) { yield DocstringCommentDO { element_oid : tmp.element_oid, text : tmp.text, documented_element_oid : tmp.documented_element_oid } - } + } } /** * @brief gets the text of this element. @@ -1069,14 +1069,14 @@ impl ElementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ElementDO { - for (tmp in db.element) { + for (tmp in db.element) { yield ElementDO { oid : tmp.oid, value : tmp.value, type : tmp.type, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the value of this element. @@ -1114,7 +1114,7 @@ impl ExceptHandlerDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ExceptHandlerDO { - for (tmp in db.except_handler) { + for (tmp in db.except_handler) { yield ExceptHandlerDO { element_oid : tmp.element_oid, element_index : tmp.element_index, @@ -1122,7 +1122,7 @@ impl ExceptHandlerDO { location_oid : tmp.location_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the element index of this element. @@ -1165,13 +1165,13 @@ impl ExprContextDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ExprContextDO { - for (tmp in db.expr_context) { + for (tmp in db.expr_context) { yield ExprContextDO { element_oid : tmp.element_oid, parent_oid : tmp.parent_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the parent oid of this element. @@ -1203,7 +1203,7 @@ impl ExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ExpressionDO { - for (tmp in db.expression) { + for (tmp in db.expression) { yield ExpressionDO { element_oid : tmp.element_oid, type : tmp.type, @@ -1212,7 +1212,7 @@ impl ExpressionDO { location_oid : tmp.location_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the type of this element. @@ -1261,12 +1261,12 @@ impl ExpressionStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ExpressionStatementDO { - for (tmp in db.expression_statement) { + for (tmp in db.expression_statement) { yield ExpressionStatementDO { element_oid : tmp.element_oid, value_oid : tmp.value_oid } - } + } } /** * @brief gets the value oid of this element. @@ -1290,7 +1290,7 @@ impl FileDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *FileDO { - for (tmp in db.file) { + for (tmp in db.file) { yield FileDO { element_oid : tmp.element_oid, relative_path : tmp.relative_path, @@ -1298,7 +1298,7 @@ impl FileDO { name : tmp.name, number_of_lines_oid : tmp.number_of_lines_oid } - } + } } /** * @brief gets the relative path of this element. @@ -1340,12 +1340,12 @@ impl Modified2To3FileDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *Modified2To3FileDO { - for (tmp in db.modified_2to3_file) { + for (tmp in db.modified_2to3_file) { yield Modified2To3FileDO { element_oid : tmp.element_oid, relative_path : tmp.relative_path } - } + } } /** * @brief gets the relative path of this element. @@ -1368,14 +1368,14 @@ impl ParseErrorFileDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ParseErrorFileDO { - for (tmp in db.parse_error_file) { + for (tmp in db.parse_error_file) { yield ParseErrorFileDO { element_oid : tmp.element_oid, relative_path : tmp.relative_path, error_message : tmp.error_message, error_text : tmp.error_text } - } + } } /** * @brief gets the relative path of this element. @@ -1410,12 +1410,12 @@ impl FileMd5SumDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *FileMd5SumDO { - for (tmp in db.file_md5_sum) { + for (tmp in db.file_md5_sum) { yield FileMd5SumDO { file_oid : tmp.file_oid, value : tmp.value } - } + } } /** * @brief gets the value of this element. @@ -1436,12 +1436,12 @@ impl FileSha256SumDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *FileSha256SumDO { - for (tmp in db.file_sha256_sum) { + for (tmp in db.file_sha256_sum) { yield FileSha256SumDO { file_oid : tmp.file_oid, value : tmp.value } - } + } } /** * @brief gets the value of this element. @@ -1464,14 +1464,14 @@ impl FolderDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *FolderDO { - for (tmp in db.folder) { + for (tmp in db.folder) { yield FolderDO { element_oid : tmp.element_oid, qualified_name : tmp.qualified_name, name : tmp.name, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the qualified name of this element. @@ -1505,11 +1505,11 @@ impl ForStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ForStatementDO { - for (tmp in db.for_statement) { + for (tmp in db.for_statement) { yield ForStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -1523,12 +1523,12 @@ impl FormattedValueExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *FormattedValueExpressionDO { - for (tmp in db.formatted_value_expression) { + for (tmp in db.formatted_value_expression) { yield FormattedValueExpressionDO { element_oid : tmp.element_oid, value_oid : tmp.value_oid } - } + } } /** * @brief gets the value oid of this element. @@ -1549,12 +1549,12 @@ impl FunctionDefStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *FunctionDefStatementDO { - for (tmp in db.function_def_statement) { + for (tmp in db.function_def_statement) { yield FunctionDefStatementDO { element_oid : tmp.element_oid, name : tmp.name } - } + } } /** * @brief gets the name of this element. @@ -1575,12 +1575,12 @@ impl GeneratorExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *GeneratorExpressionDO { - for (tmp in db.generator_expression) { + for (tmp in db.generator_expression) { yield GeneratorExpressionDO { element_oid : tmp.element_oid, elt_oid : tmp.elt_oid } - } + } } /** * @brief gets the elt oid of this element. @@ -1601,12 +1601,12 @@ impl GlobalStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *GlobalStatementDO { - for (tmp in db.global_statement) { + for (tmp in db.global_statement) { yield GlobalStatementDO { element_oid : tmp.element_oid, names : tmp.names } - } + } } /** * @brief gets the names of this element. @@ -1626,11 +1626,11 @@ impl IfExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *IfExpressionDO { - for (tmp in db.if_expression) { + for (tmp in db.if_expression) { yield IfExpressionDO { element_oid : tmp.element_oid } - } + } } } /** @@ -1643,11 +1643,11 @@ impl IfStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *IfStatementDO { - for (tmp in db.if_statement) { + for (tmp in db.if_statement) { yield IfStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -1662,13 +1662,13 @@ impl ImportFromStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ImportFromStatementDO { - for (tmp in db.import_from_statement) { + for (tmp in db.import_from_statement) { yield ImportFromStatementDO { element_oid : tmp.element_oid, module : tmp.module, level : tmp.level } - } + } } /** * @brief gets the module of this element. @@ -1695,11 +1695,11 @@ impl ImportStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ImportStatementDO { - for (tmp in db.import_statement) { + for (tmp in db.import_statement) { yield ImportStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -1713,12 +1713,12 @@ impl JoinedStrExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *JoinedStrExpressionDO { - for (tmp in db.joined_str_expression) { + for (tmp in db.joined_str_expression) { yield JoinedStrExpressionDO { element_oid : tmp.element_oid, size : tmp.size } - } + } } /** * @brief gets the size of this element. @@ -1744,7 +1744,7 @@ impl KeywordDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *KeywordDO { - for (tmp in db.keyword) { + for (tmp in db.keyword) { yield KeywordDO { element_oid : tmp.element_oid, arg_value : tmp.arg_value, @@ -1754,7 +1754,7 @@ impl KeywordDO { location_oid : tmp.location_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the arg value of this element. @@ -1809,11 +1809,11 @@ impl LambdaExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *LambdaExpressionDO { - for (tmp in db.lambda_expression) { + for (tmp in db.lambda_expression) { yield LambdaExpressionDO { element_oid : tmp.element_oid } - } + } } } /** @@ -1828,13 +1828,13 @@ impl ListCompExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ListCompExpressionDO { - for (tmp in db.list_comp_expression) { + for (tmp in db.list_comp_expression) { yield ListCompExpressionDO { element_oid : tmp.element_oid, elt_oid : tmp.elt_oid, generator_size : tmp.generator_size } - } + } } /** * @brief gets the elt oid of this element. @@ -1863,13 +1863,13 @@ impl ListExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ListExpressionDO { - for (tmp in db.list_expression) { + for (tmp in db.list_expression) { yield ListExpressionDO { element_oid : tmp.element_oid, elt_size : tmp.elt_size, ctx : tmp.ctx } - } + } } /** * @brief gets the elt size of this element. @@ -1901,7 +1901,7 @@ impl LocationDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *LocationDO { - for (tmp in db.location) { + for (tmp in db.location) { yield LocationDO { element_oid : tmp.element_oid, file_oid : tmp.file_oid, @@ -1910,7 +1910,7 @@ impl LocationDO { end_line_number : tmp.end_line_number, end_column_number : tmp.end_column_number } - } + } } /** * @brief gets the file oid of this element. @@ -1964,7 +1964,7 @@ impl MatchCaseDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *MatchCaseDO { - for (tmp in db.match_case) { + for (tmp in db.match_case) { yield MatchCaseDO { element_oid : tmp.element_oid, pattern_oid : tmp.pattern_oid, @@ -1974,7 +1974,7 @@ impl MatchCaseDO { printable_text : tmp.printable_text, is_default : tmp.is_default } - } + } } /** * @brief gets the pattern oid of this element. @@ -2030,12 +2030,12 @@ impl MatchStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *MatchStatementDO { - for (tmp in db.match_statement) { + for (tmp in db.match_statement) { yield MatchStatementDO { element_oid : tmp.element_oid, subject_oid : tmp.subject_oid } - } + } } /** * @brief gets the subject oid of this element. @@ -2058,14 +2058,14 @@ impl MetainfoDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *MetainfoDO { - for (tmp in db.metainfo) { + for (tmp in db.metainfo) { yield MetainfoDO { oid : tmp.oid, kind : tmp.kind, value : tmp.value, program_oid : tmp.program_oid } - } + } } /** * @brief gets the kind of this element. @@ -2101,13 +2101,13 @@ impl ModDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ModDO { - for (tmp in db.mod) { + for (tmp in db.mod) { yield ModDO { element_oid : tmp.element_oid, type : tmp.type, location_oid : tmp.location_oid } - } + } } /** * @brief gets the type of this element. @@ -2137,14 +2137,14 @@ impl ModuleDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ModuleDO { - for (tmp in db.module) { + for (tmp in db.module) { yield ModuleDO { element_oid : tmp.element_oid, name : tmp.name, file_oid : tmp.file_oid, location_oid : tmp.location_oid } - } + } } /** * @brief gets the name of this element. @@ -2179,12 +2179,12 @@ impl ScopeEnclosingExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ScopeEnclosingExpressionDO { - for (tmp in db.scope_enclosing_expression) { + for (tmp in db.scope_enclosing_expression) { yield ScopeEnclosingExpressionDO { expression_oid : tmp.expression_oid, scope_oid : tmp.scope_oid } - } + } } /** * @brief gets the scope oid of this element. @@ -2205,12 +2205,12 @@ impl ScopeEnclosingStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ScopeEnclosingStatementDO { - for (tmp in db.scope_enclosing_statement) { + for (tmp in db.scope_enclosing_statement) { yield ScopeEnclosingStatementDO { statement_oid : tmp.statement_oid, scope_oid : tmp.scope_oid } - } + } } /** * @brief gets the scope oid of this element. @@ -2231,12 +2231,12 @@ impl NameExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *NameExpressionDO { - for (tmp in db.name_expression) { + for (tmp in db.name_expression) { yield NameExpressionDO { element_oid : tmp.element_oid, ctx_type : tmp.ctx_type } - } + } } /** * @brief gets the ctx type of this element. @@ -2258,13 +2258,13 @@ impl NamedExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *NamedExpressionDO { - for (tmp in db.named_expression) { + for (tmp in db.named_expression) { yield NamedExpressionDO { element_oid : tmp.element_oid, target_oid : tmp.target_oid, value_oid : tmp.value_oid } - } + } } /** * @brief gets the target oid of this element. @@ -2292,12 +2292,12 @@ impl NonLocalStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *NonLocalStatementDO { - for (tmp in db.non_local_statement) { + for (tmp in db.non_local_statement) { yield NonLocalStatementDO { element_oid : tmp.element_oid, names : tmp.names } - } + } } /** * @brief gets the names of this element. @@ -2320,14 +2320,14 @@ impl NumberOfLinesDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *NumberOfLinesDO { - for (tmp in db.number_of_lines) { + for (tmp in db.number_of_lines) { yield NumberOfLinesDO { element_oid : tmp.element_oid, number_of_total_lines : tmp.number_of_total_lines, number_of_valid_lines : tmp.number_of_valid_lines, number_of_comment_lines : tmp.number_of_comment_lines } - } + } } /** * @brief gets the number of total lines of this element. @@ -2364,14 +2364,14 @@ impl OperatorDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *OperatorDO { - for (tmp in db.operator) { + for (tmp in db.operator) { yield OperatorDO { element_oid : tmp.element_oid, location_oid : tmp.location_oid, parent_oid : tmp.parent_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the location oid of this element. @@ -2406,12 +2406,12 @@ impl ParentDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ParentDO { - for (tmp in db.parent) { + for (tmp in db.parent) { yield ParentDO { parent_oid : tmp.parent_oid, parent_type : tmp.parent_type } - } + } } /** * @brief gets the parent type of this element. @@ -2431,11 +2431,11 @@ impl PassStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *PassStatementDO { - for (tmp in db.pass_statement) { + for (tmp in db.pass_statement) { yield PassStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -2449,12 +2449,12 @@ impl ProgramDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ProgramDO { - for (tmp in db.program) { + for (tmp in db.program) { yield ProgramDO { program_oid : tmp.program_oid, absolute_prefix_path : tmp.absolute_prefix_path } - } + } } /** * @brief gets the absolute prefix path of this element. @@ -2474,11 +2474,11 @@ impl RaiseStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *RaiseStatementDO { - for (tmp in db.raise_statement) { + for (tmp in db.raise_statement) { yield RaiseStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -2492,12 +2492,12 @@ impl ReferenceRelationDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ReferenceRelationDO { - for (tmp in db.reference_relation) { + for (tmp in db.reference_relation) { yield ReferenceRelationDO { reference_element_oid : tmp.reference_element_oid, definition_element_oid : tmp.definition_element_oid } - } + } } /** * @brief gets the definition element oid of this element. @@ -2518,12 +2518,12 @@ impl ReturnStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *ReturnStatementDO { - for (tmp in db.return_statement) { + for (tmp in db.return_statement) { yield ReturnStatementDO { element_oid : tmp.element_oid, is_return_empty : tmp.is_return_empty } - } + } } /** * @brief gets the is return empty of this element. @@ -2545,13 +2545,13 @@ impl SetCompExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *SetCompExpressionDO { - for (tmp in db.set_comp_expression) { + for (tmp in db.set_comp_expression) { yield SetCompExpressionDO { element_oid : tmp.element_oid, elt_oid : tmp.elt_oid, generator_size : tmp.generator_size } - } + } } /** * @brief gets the elt oid of this element. @@ -2579,12 +2579,12 @@ impl SetExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *SetExpressionDO { - for (tmp in db.set_expression) { + for (tmp in db.set_expression) { yield SetExpressionDO { element_oid : tmp.element_oid, elt_size : tmp.elt_size } - } + } } /** * @brief gets the elt size of this element. @@ -2609,7 +2609,7 @@ impl SliceDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *SliceDO { - for (tmp in db.slice) { + for (tmp in db.slice) { yield SliceDO { element_oid : tmp.element_oid, element_index : tmp.element_index, @@ -2618,7 +2618,7 @@ impl SliceDO { printable_text : tmp.printable_text, has_step : tmp.has_step } - } + } } /** * @brief gets the element index of this element. @@ -2667,12 +2667,12 @@ impl StarredExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *StarredExpressionDO { - for (tmp in db.starred_expression) { + for (tmp in db.starred_expression) { yield StarredExpressionDO { element_oid : tmp.element_oid, ctx : tmp.ctx } - } + } } /** * @brief gets the ctx of this element. @@ -2697,7 +2697,7 @@ impl StatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *StatementDO { - for (tmp in db.statement) { + for (tmp in db.statement) { yield StatementDO { element_oid : tmp.element_oid, type : tmp.type, @@ -2706,7 +2706,7 @@ impl StatementDO { location_oid : tmp.location_oid, printable_text : tmp.printable_text } - } + } } /** * @brief gets the type of this element. @@ -2757,14 +2757,14 @@ impl SubscriptExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *SubscriptExpressionDO { - for (tmp in db.subscript_expression) { + for (tmp in db.subscript_expression) { yield SubscriptExpressionDO { element_oid : tmp.element_oid, value_oid : tmp.value_oid, slice_oid : tmp.slice_oid, ctx : tmp.ctx } - } + } } /** * @brief gets the value oid of this element. @@ -2801,14 +2801,14 @@ impl TokenDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *TokenDO { - for (tmp in db.token) { + for (tmp in db.token) { yield TokenDO { element_oid : tmp.element_oid, value : tmp.value, location_oid : tmp.location_oid, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the value of this element. @@ -2842,11 +2842,11 @@ impl TryStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *TryStatementDO { - for (tmp in db.try_statement) { + for (tmp in db.try_statement) { yield TryStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -2861,13 +2861,13 @@ impl TupleExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *TupleExpressionDO { - for (tmp in db.tuple_expression) { + for (tmp in db.tuple_expression) { yield TupleExpressionDO { element_oid : tmp.element_oid, elt_size : tmp.elt_size, ctx : tmp.ctx } - } + } } /** * @brief gets the elt size of this element. @@ -2897,14 +2897,14 @@ impl UnaryOpDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *UnaryOpDO { - for (tmp in db.unary_op) { + for (tmp in db.unary_op) { yield UnaryOpDO { element_oid : tmp.element_oid, type : tmp.type, location_oid : tmp.location_oid, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the type of this element. @@ -2940,13 +2940,13 @@ impl UnaryOpExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *UnaryOpExpressionDO { - for (tmp in db.unary_op_expression) { + for (tmp in db.unary_op_expression) { yield UnaryOpExpressionDO { element_oid : tmp.element_oid, op_code : tmp.op_code, operand_oid : tmp.operand_oid } - } + } } /** * @brief gets the op code of this element. @@ -2977,7 +2977,7 @@ impl VariableDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *VariableDO { - for (tmp in db.variable) { + for (tmp in db.variable) { yield VariableDO { element_oid : tmp.element_oid, parent_oid : tmp.parent_oid, @@ -2985,7 +2985,7 @@ impl VariableDO { printable_text : tmp.printable_text, name : tmp.name } - } + } } /** * @brief gets the parent oid of this element. @@ -3026,11 +3026,11 @@ impl WhileStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *WhileStatementDO { - for (tmp in db.while_statement) { + for (tmp in db.while_statement) { yield WhileStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -3046,14 +3046,14 @@ impl WithItemDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *WithItemDO { - for (tmp in db.with_item) { + for (tmp in db.with_item) { yield WithItemDO { element_oid : tmp.element_oid, printable_text : tmp.printable_text, element_index : tmp.element_index, parent_oid : tmp.parent_oid } - } + } } /** * @brief gets the printable text of this element. @@ -3087,11 +3087,11 @@ impl WithStatementDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *WithStatementDO { - for (tmp in db.with_statement) { + for (tmp in db.with_statement) { yield WithStatementDO { element_oid : tmp.element_oid } - } + } } } /** @@ -3104,11 +3104,11 @@ impl YieldExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *YieldExpressionDO { - for (tmp in db.yield_expression) { + for (tmp in db.yield_expression) { yield YieldExpressionDO { element_oid : tmp.element_oid } - } + } } } /** @@ -3122,12 +3122,12 @@ impl YieldFromExpressionDO { @data_constraint @inline pub fn __all__(db: PythonDB) -> *YieldFromExpressionDO { - for (tmp in db.yield_from_expression) { + for (tmp in db.yield_from_expression) { yield YieldFromExpressionDO { element_oid : tmp.element_oid, value : tmp.value } - } + } } /** * @brief gets the value of this element. diff --git a/language/python/lib/Decorator.gdl b/language/python/lib/Decorator.gdl index 629a361e..72ea36b3 100644 --- a/language/python/lib/Decorator.gdl +++ b/language/python/lib/Decorator.gdl @@ -7,7 +7,7 @@ schema Decorator extends Expression { impl Decorator { @data_constraint @inline - fn __all__(db: PythonDB) -> *Decorator { + pub fn __all__(db: PythonDB) -> *Decorator { for (tmp in Expression(db)) { for (d in DecoratorDO(db)) { if (tmp.key_eq(d)) { @@ -47,7 +47,7 @@ schema DecoratedRelation extends DecoratedRelationDO { impl DecoratedRelation { @data_constraint @inline - fn __all__(db: PythonDB) -> *DecoratedRelation { + pub fn __all__(db: PythonDB) -> *DecoratedRelation { for (tmp in DecoratedRelationDO(db)) { yield DecoratedRelation { decorator_oid : tmp.decorator_oid, diff --git a/language/python/lib/Documentation.gdl b/language/python/lib/Documentation.gdl index 00597e96..e58d3391 100644 --- a/language/python/lib/Documentation.gdl +++ b/language/python/lib/Documentation.gdl @@ -7,7 +7,7 @@ schema Comment extends CommentDO { impl Comment { @data_constraint @inline - fn __all__(db: PythonDB) -> *Comment { + pub fn __all__(db: PythonDB) -> *Comment { for (tmp in CommentDO(db)) { yield Comment { element_oid : tmp.element_oid, @@ -110,7 +110,7 @@ schema DocstringComment extends DocstringCommentDO { impl DocstringComment { @data_constraint @inline - fn __all__(db: PythonDB) -> *DocstringComment { + pub fn __all__(db: PythonDB) -> *DocstringComment { for (tmp in DocstringCommentDO(db)) { yield DocstringComment { element_oid : tmp.element_oid, diff --git a/language/python/lib/Element.gdl b/language/python/lib/Element.gdl index e27c90ea..e55eef25 100644 --- a/language/python/lib/Element.gdl +++ b/language/python/lib/Element.gdl @@ -7,7 +7,7 @@ schema CombineElement { impl CombineElement { @data_constraint @inline - fn __all__(db: PythonDB) -> *CombineElement { + pub fn __all__(db: PythonDB) -> *CombineElement { for (e in Element(db)) { yield CombineElement {id : e.oid} } @@ -525,7 +525,7 @@ schema Element extends ElementDO { impl Element { @data_constraint @inline - fn __all__(db: PythonDB) -> *Element { + pub fn __all__(db: PythonDB) -> *Element { for (tmp in ElementDO(db)) { yield Element { oid : tmp.oid, diff --git a/language/python/lib/Expression.gdl b/language/python/lib/Expression.gdl index bfeec16e..6a629700 100644 --- a/language/python/lib/Expression.gdl +++ b/language/python/lib/Expression.gdl @@ -7,7 +7,7 @@ schema Expression extends ExpressionDO { impl Expression { @data_constraint @inline - fn __all__(db: PythonDB) -> *Expression { + pub fn __all__(db: PythonDB) -> *Expression { for (tmp in ExpressionDO(db)) { yield Expression { element_oid : tmp.element_oid, @@ -87,7 +87,7 @@ schema IfExpression extends Expression { impl IfExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *IfExpression { + pub fn __all__(db: PythonDB) -> *IfExpression { for (tmp in Expression(db)) { for (e in IfExpressionDO(db)) { if (tmp.key_eq(e)) { @@ -113,7 +113,7 @@ schema BooleanExpression extends Expression { impl BooleanExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *BooleanExpression { + pub fn __all__(db: PythonDB) -> *BooleanExpression { for (tmp in Expression(db)) { for (e in BooleanOpExpressionDO(db)) { if (tmp.key_eq(e)) { @@ -161,7 +161,7 @@ schema AndLogicalExpression extends BooleanExpression { impl AndLogicalExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *AndLogicalExpression { + pub fn __all__(db: PythonDB) -> *AndLogicalExpression { for (tmp in BooleanExpression(db)) { if (tmp.getType() = "And") { yield AndLogicalExpression { @@ -185,7 +185,7 @@ schema OrLogicalExpression extends BooleanExpression { impl OrLogicalExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *OrLogicalExpression { + pub fn __all__(db: PythonDB) -> *OrLogicalExpression { for (tmp in BooleanExpression(db)) { if (tmp.getType() = "Or") { yield OrLogicalExpression { @@ -209,7 +209,7 @@ schema AttributeExpression extends Expression { impl AttributeExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *AttributeExpression { + pub fn __all__(db: PythonDB) -> *AttributeExpression { for (tmp in Expression(db)) { for (a in AttributeExpressionDO(db)) { if (tmp.key_eq(a)) { @@ -235,7 +235,7 @@ schema CallExpression extends Expression { impl CallExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *CallExpression { + pub fn __all__(db: PythonDB) -> *CallExpression { for (tmp in Expression(db)) { for (c in CallExpressionDO(db)) { if (tmp.key_eq(c)) { @@ -302,7 +302,7 @@ schema ListCompExpression extends Expression { impl ListCompExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *ListCompExpression { + pub fn __all__(db: PythonDB) -> *ListCompExpression { for (tmp in Expression(db)) { for (c in ListCompExpressionDO(db)) { if (tmp.key_eq(c)) { diff --git a/language/python/lib/Function.gdl b/language/python/lib/Function.gdl index e49c8da3..bb54408d 100644 --- a/language/python/lib/Function.gdl +++ b/language/python/lib/Function.gdl @@ -7,7 +7,7 @@ schema Function extends Statement { impl Function { @data_constraint @inline - fn __all__(db: PythonDB) -> *Function { + pub fn __all__(db: PythonDB) -> *Function { for (tmp in Statement(db)) { for (f in FunctionDefStatement(db)) { if (tmp.key_eq(f)) { @@ -130,7 +130,7 @@ schema InitFunction extends Function { impl InitFunction { @data_constraint @inline - fn __all__(db: PythonDB) -> *InitFunction { + pub fn __all__(db: PythonDB) -> *InitFunction { for (tmp in Function(db)) { if (tmp.getName() = "__init__") { yield InitFunction { diff --git a/language/python/lib/Keyword.gdl b/language/python/lib/Keyword.gdl index 5ff666d9..1750b383 100644 --- a/language/python/lib/Keyword.gdl +++ b/language/python/lib/Keyword.gdl @@ -7,7 +7,7 @@ schema Keyword extends KeywordDO { impl Keyword { @data_constraint @inline - fn __all__(db: PythonDB) -> *Keyword { + pub fn __all__(db: PythonDB) -> *Keyword { for (tmp in KeywordDO(db)) { yield Keyword { element_oid : tmp.element_oid, @@ -81,7 +81,7 @@ schema KeywordWithoutName extends Keyword { impl KeywordWithoutName { @data_constraint @inline - fn __all__(db: PythonDB) -> *KeywordWithoutName { + pub fn __all__(db: PythonDB) -> *KeywordWithoutName { for (tmp in Keyword(db)) { if (tmp.getArgName() = "None") { yield KeywordWithoutName { diff --git a/language/python/lib/Location.gdl b/language/python/lib/Location.gdl index 1f17a348..972df608 100644 --- a/language/python/lib/Location.gdl +++ b/language/python/lib/Location.gdl @@ -7,7 +7,7 @@ schema Location extends LocationDO { impl Location { @data_constraint @inline - fn __all__(db: PythonDB) -> *Location { + pub fn __all__(db: PythonDB) -> *Location { for (tmp in LocationDO(db)) { yield Location { element_oid : tmp.element_oid, @@ -40,7 +40,7 @@ schema NumberOfLines extends NumberOfLinesDO { impl NumberOfLines { @data_constraint @inline - fn __all__(db: PythonDB) -> *NumberOfLines { + pub fn __all__(db: PythonDB) -> *NumberOfLines { for (tmp in NumberOfLinesDO(db)) { yield NumberOfLines { element_oid : tmp.element_oid, diff --git a/language/python/lib/Metrics.gdl b/language/python/lib/Metrics.gdl index 617e7c97..227a926c 100644 --- a/language/python/lib/Metrics.gdl +++ b/language/python/lib/Metrics.gdl @@ -7,7 +7,7 @@ schema ScopeEnclosingExpression extends ScopeEnclosingExpressionDO { impl ScopeEnclosingExpression { @data_constraint @inline - fn __all__(db: PythonDB) -> *ScopeEnclosingExpression { + pub fn __all__(db: PythonDB) -> *ScopeEnclosingExpression { for (tmp in ScopeEnclosingExpressionDO(db)) { yield ScopeEnclosingExpression { expression_oid : tmp.expression_oid, @@ -83,7 +83,7 @@ schema ScopeEnclosignStatement extends ScopeEnclosingStatementDO { impl ScopeEnclosignStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *ScopeEnclosignStatement { + pub fn __all__(db: PythonDB) -> *ScopeEnclosignStatement { for (tmp in ScopeEnclosingStatementDO(db)) { yield ScopeEnclosignStatement { statement_oid : tmp.statement_oid, @@ -159,7 +159,7 @@ schema MetricFunction extends Function { impl MetricFunction { @data_constraint @inline - fn __all__(db: PythonDB) -> *MetricFunction { + pub fn __all__(db: PythonDB) -> *MetricFunction { for (tmp in Function(db)) { yield MetricFunction { element_oid : tmp.element_oid, diff --git a/language/python/lib/Scope.gdl b/language/python/lib/Scope.gdl index 3a48405c..88883b16 100644 --- a/language/python/lib/Scope.gdl +++ b/language/python/lib/Scope.gdl @@ -9,7 +9,7 @@ schema Scope extends CombineElement { impl Scope { @data_constraint @inline - fn __all__(db: PythonDB) -> *Scope { + pub fn __all__(db: PythonDB) -> *Scope { for (tmp in CombineElement(db)) { for (m in Module(db)) { if (tmp.key_eq(m)) { diff --git a/language/python/lib/Slice.gdl b/language/python/lib/Slice.gdl index c2d0dc1e..52f6002f 100644 --- a/language/python/lib/Slice.gdl +++ b/language/python/lib/Slice.gdl @@ -7,7 +7,7 @@ schema Slice extends SliceDO { impl Slice { @data_constraint @inline - fn __all__(db: PythonDB) -> *Slice { + pub fn __all__(db: PythonDB) -> *Slice { for (tmp in SliceDO(db)) { yield Slice { element_oid : tmp.element_oid, diff --git a/language/python/lib/Statement.gdl b/language/python/lib/Statement.gdl index df78c987..a00bf6aa 100644 --- a/language/python/lib/Statement.gdl +++ b/language/python/lib/Statement.gdl @@ -7,7 +7,7 @@ schema Statement extends StatementDO { impl Statement { @data_constraint @inline - fn __all__(db: PythonDB) -> *Statement { + pub fn __all__(db: PythonDB) -> *Statement { for (tmp in StatementDO(db)) { yield Statement { element_oid : tmp.element_oid, @@ -109,7 +109,7 @@ schema FunctionDefStatement extends Statement { impl FunctionDefStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *FunctionDefStatement { + pub fn __all__(db: PythonDB) -> *FunctionDefStatement { for (tmp in Statement(db)) { for (f in FunctionDefStatementDO(db)) { if (tmp.key_eq(f)) { @@ -150,7 +150,7 @@ schema AsyncFunctionDefStatement extends Statement { impl AsyncFunctionDefStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *AsyncFunctionDefStatement { + pub fn __all__(db: PythonDB) -> *AsyncFunctionDefStatement { for (tmp in Statement(db)) { for (f in AsyncFunctionDefStatementDO(db)) { if (tmp.key_eq(f)) { @@ -191,7 +191,7 @@ schema ClassDefStatement extends Statement { impl ClassDefStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *ClassDefStatement { + pub fn __all__(db: PythonDB) -> *ClassDefStatement { for (tmp in Statement(db)) { for (f in ClassDefStatementDO(db)) { if (tmp.key_eq(f)) { @@ -232,7 +232,7 @@ schema ForStatement extends Statement { impl ForStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *ForStatement { + pub fn __all__(db: PythonDB) -> *ForStatement { for (tmp in Statement(db)) { for (f in ForStatementDO(db)) { if (tmp.key_eq(f)) { @@ -258,7 +258,7 @@ schema IfStatement extends Statement { impl IfStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *IfStatement { + pub fn __all__(db: PythonDB) -> *IfStatement { for (tmp in Statement(db)) { for (f in IfStatementDO(db)) { if (tmp.key_eq(f)) { @@ -284,7 +284,7 @@ schema WhileStatement extends Statement { impl WhileStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *WhileStatement { + pub fn __all__(db: PythonDB) -> *WhileStatement { for (tmp in Statement(db)) { for (f in WhileStatementDO(db)) { if (tmp.key_eq(f)) { @@ -310,7 +310,7 @@ schema TryStatement extends Statement { impl TryStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *TryStatement { + pub fn __all__(db: PythonDB) -> *TryStatement { for (tmp in Statement(db)) { for (f in TryStatementDO(db)) { if (tmp.key_eq(f)) { @@ -336,7 +336,7 @@ schema ExceptHandler extends ExceptHandlerDO { impl ExceptHandler { @data_constraint @inline - fn __all__(db: PythonDB) -> *ExceptHandler { + pub fn __all__(db: PythonDB) -> *ExceptHandler { for (tmp in ExceptHandlerDO(db)) { yield ExceptHandler { element_oid : tmp.element_oid, @@ -390,7 +390,7 @@ schema MatchStatement extends Statement { impl MatchStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *MatchStatement { + pub fn __all__(db: PythonDB) -> *MatchStatement { for (tmp in Statement(db)) { for (s in MatchStatementDO(db)) { if (tmp.key_eq(s)) { @@ -427,7 +427,7 @@ schema MatchCase extends MatchCaseDO { impl MatchCase { @data_constraint @inline - fn __all__(db: PythonDB) -> *MatchCase { + pub fn __all__(db: PythonDB) -> *MatchCase { for (tmp in MatchCaseDO(db)) { yield MatchCase { element_oid : tmp.element_oid, @@ -494,7 +494,7 @@ schema BreakStatement extends Statement { impl BreakStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *BreakStatement { + pub fn __all__(db: PythonDB) -> *BreakStatement { for (tmp in Statement(db)) { for (s in BreakStatementDO(db)) { if (tmp.key_eq(s)) { @@ -520,7 +520,7 @@ schema ReturnStatement extends Statement { impl ReturnStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *ReturnStatement { + pub fn __all__(db: PythonDB) -> *ReturnStatement { for (tmp in Statement(db)) { for (s in ReturnStatementDO(db)) { if (tmp.key_eq(s)) { @@ -546,7 +546,7 @@ schema ImportStatement extends Statement { impl ImportStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *ImportStatement { + pub fn __all__(db: PythonDB) -> *ImportStatement { for (tmp in Statement(db)) { for (i in ImportStatementDO(db)) { if (tmp.key_eq(i)) { @@ -583,7 +583,7 @@ schema ImportFromStatement extends Statement { impl ImportFromStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *ImportFromStatement { + pub fn __all__(db: PythonDB) -> *ImportFromStatement { for (tmp in Statement(db)) { for (i in ImportFromStatementDO(db)) { if (tmp.key_eq(i)) { @@ -624,7 +624,7 @@ schema WithStatement extends Statement { impl WithStatement { @data_constraint @inline - fn __all__(db: PythonDB) -> *WithStatement { + pub fn __all__(db: PythonDB) -> *WithStatement { for (tmp in Statement(db)) { for (w in WithStatementDO(db)) { if (tmp.key_eq(w)) { diff --git a/language/python/lib/Withitem.gdl b/language/python/lib/Withitem.gdl index 196a3b75..c489eac7 100644 --- a/language/python/lib/Withitem.gdl +++ b/language/python/lib/Withitem.gdl @@ -7,7 +7,7 @@ schema WithItem extends WithItemDO { impl WithItem { @data_constraint @inline - fn __all__(db: PythonDB) -> *WithItem { + pub fn __all__(db: PythonDB) -> *WithItem { for (tmp in WithItemDO(db)) { yield WithItem { element_oid : tmp.element_oid, diff --git a/language/xml/lib/DOClass.gdl b/language/xml/lib/DOClass.gdl index a9cd21ba..49b396be 100644 --- a/language/xml/lib/DOClass.gdl +++ b/language/xml/lib/DOClass.gdl @@ -11,8 +11,9 @@ schema XmlAttributeDO { } impl XmlAttributeDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlAttributeDO { - for (tmp in db.xml_attribute) { + @inline + pub fn __all__(db: XmlDB) -> *XmlAttributeDO { + for (tmp in db.xml_attribute) { yield XmlAttributeDO { id : tmp.id, element_id : tmp.element_id, @@ -21,7 +22,7 @@ impl XmlAttributeDO { index_order : tmp.index_order, location_id : tmp.location_id } - } + } } /** * @brief gets the element id of the attribute. @@ -72,8 +73,9 @@ schema XmlCharacterDO { } impl XmlCharacterDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlCharacterDO { - for (tmp in db.xml_character) { + @inline + pub fn __all__(db: XmlDB) -> *XmlCharacterDO { + for (tmp in db.xml_character) { yield XmlCharacterDO { id : tmp.id, text : tmp.text, @@ -82,7 +84,7 @@ impl XmlCharacterDO { is_cdata : tmp.is_cdata, location_id : tmp.location_id } - } + } } /** * @brief gets the text of the element. @@ -131,15 +133,16 @@ schema XmlCommentDO { } impl XmlCommentDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlCommentDO { - for (tmp in db.xml_comment) { + @inline + pub fn __all__(db: XmlDB) -> *XmlCommentDO { + for (tmp in db.xml_comment) { yield XmlCommentDO { id : tmp.id, text : tmp.text, parent_id : tmp.parent_id, location_id : tmp.location_id } - } + } } /** * @brief gets the text of the comment. @@ -175,8 +178,9 @@ schema XmlDtdDO { } impl XmlDtdDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlDtdDO { - for (tmp in db.xml_dtd) { + @inline + pub fn __all__(db: XmlDB) -> *XmlDtdDO { + for (tmp in db.xml_dtd) { yield XmlDtdDO { id : tmp.id, root : tmp.root, @@ -184,7 +188,7 @@ impl XmlDtdDO { system_id : tmp.system_id, location_id : tmp.location_id } - } + } } /** * @brief gets the root of the element. @@ -224,13 +228,14 @@ schema XmlEncodingDO { } impl XmlEncodingDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlEncodingDO { - for (tmp in db.xml_encoding) { + @inline + pub fn __all__(db: XmlDB) -> *XmlEncodingDO { + for (tmp in db.xml_encoding) { yield XmlEncodingDO { id : tmp.id, encoding : tmp.encoding } - } + } } /** * @brief gets the encoding information. @@ -251,15 +256,16 @@ schema XmlHasNamespaceDO { } impl XmlHasNamespaceDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlHasNamespaceDO { - for (tmp in db.xml_has_namespace) { + @inline + pub fn __all__(db: XmlDB) -> *XmlHasNamespaceDO { + for (tmp in db.xml_has_namespace) { yield XmlHasNamespaceDO { id : tmp.id, element_id : tmp.element_id, namespace_id : tmp.namespace_id, container_id : tmp.container_id } - } + } } /** * @brief gets the element id. @@ -294,15 +300,16 @@ schema XmlNamespaceDO { } impl XmlNamespaceDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlNamespaceDO { - for (tmp in db.xml_namespace) { + @inline + pub fn __all__(db: XmlDB) -> *XmlNamespaceDO { + for (tmp in db.xml_namespace) { yield XmlNamespaceDO { id : tmp.id, prefix_name : tmp.prefix_name, url : tmp.url, location_id : tmp.location_id } - } + } } /** * @brief gets the prefix name of the element. @@ -337,15 +344,16 @@ schema XmlElementPrefixDO { } impl XmlElementPrefixDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlElementPrefixDO { - for (tmp in db.xml_element_prefix) { + @inline + pub fn __all__(db: XmlDB) -> *XmlElementPrefixDO { + for (tmp in db.xml_element_prefix) { yield XmlElementPrefixDO { name : tmp.name, id : tmp.id, parent_id : tmp.parent_id, location_id : tmp.location_id } - } + } } /** * @brief gets the name of the element. @@ -380,15 +388,16 @@ schema XmlElementNameDO { } impl XmlElementNameDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlElementNameDO { - for (tmp in db.xml_element_name) { + @inline + pub fn __all__(db: XmlDB) -> *XmlElementNameDO { + for (tmp in db.xml_element_name) { yield XmlElementNameDO { name : tmp.name, id : tmp.id, parent_id : tmp.parent_id, location_id : tmp.location_id } - } + } } /** * @brief gets the name of the element. @@ -423,15 +432,16 @@ schema XmlElementDO { } impl XmlElementDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlElementDO { - for (tmp in db.xml_element) { + @inline + pub fn __all__(db: XmlDB) -> *XmlElementDO { + for (tmp in db.xml_element) { yield XmlElementDO { id : tmp.id, parent_id : tmp.parent_id, index_order : tmp.index_order, location_id : tmp.location_id } - } + } } /** * @brief gets the parent id of the element. @@ -465,14 +475,15 @@ schema XmlFileDO { } impl XmlFileDO { @data_constraint - fn __all__(db: XmlDB) -> *XmlFileDO { - for (tmp in db.xml_file) { + @inline + pub fn __all__(db: XmlDB) -> *XmlFileDO { + for (tmp in db.xml_file) { yield XmlFileDO { id : tmp.id, file_name : tmp.file_name, relative_path : tmp.relative_path } - } + } } /** * @brief gets the name of the file. @@ -502,8 +513,9 @@ schema LocationDO { } impl LocationDO { @data_constraint - fn __all__(db: XmlDB) -> *LocationDO { - for (tmp in db.xml_location) { + @inline + pub fn __all__(db: XmlDB) -> *LocationDO { + for (tmp in db.xml_location) { yield LocationDO { id : tmp.id, start_line_number : tmp.start_line_number, @@ -512,7 +524,7 @@ impl LocationDO { end_column_number : tmp.end_column_number, file_id : tmp.file_id } - } + } } /** * @brief gets the start line number of the location element. diff --git a/language/xml/lib/Element.gdl b/language/xml/lib/Element.gdl index 0c884503..f65b2cbb 100644 --- a/language/xml/lib/Element.gdl +++ b/language/xml/lib/Element.gdl @@ -7,7 +7,7 @@ schema XmlAttribute extends XmlAttributeDO { impl XmlAttribute { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlAttribute { + pub fn __all__(db: XmlDB) -> *XmlAttribute { for (tmp in XmlAttributeDO(db)) { yield XmlAttribute { id : tmp.id, @@ -51,7 +51,7 @@ schema XmlCharacter extends XmlCharacterDO { impl XmlCharacter { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlCharacter { + pub fn __all__(db: XmlDB) -> *XmlCharacter { for (tmp in XmlCharacterDO(db)) { yield XmlCharacter { id : tmp.id, @@ -95,7 +95,7 @@ schema XmlComment extends XmlCommentDO { impl XmlComment { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlComment { + pub fn __all__(db: XmlDB) -> *XmlComment { for (tmp in XmlCommentDO(db)) { yield XmlComment { id : tmp.id, @@ -126,7 +126,7 @@ schema XmlDtd extends XmlDtdDO { impl XmlDtd { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlDtd { + pub fn __all__(db: XmlDB) -> *XmlDtd { for (tmp in XmlDtdDO(db)) { yield XmlDtd { id : tmp.id, @@ -158,7 +158,7 @@ schema XmlEncoding extends XmlEncodingDO { impl XmlEncoding { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlEncoding { + pub fn __all__(db: XmlDB) -> *XmlEncoding { for (tmp in XmlEncodingDO(db)) { yield XmlEncoding { id : tmp.id, @@ -176,7 +176,7 @@ schema XmlHasNamespace extends XmlHasNamespaceDO { impl XmlHasNamespace { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlHasNamespace { + pub fn __all__(db: XmlDB) -> *XmlHasNamespace { for (tmp in XmlHasNamespaceDO(db)) { yield XmlHasNamespace { id : tmp.id, @@ -229,7 +229,7 @@ schema XmlNamespace extends XmlNamespaceDO { impl XmlNamespace { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlNamespace { + pub fn __all__(db: XmlDB) -> *XmlNamespace { for (tmp in XmlNamespaceDO(db)) { yield XmlNamespace { id : tmp.id, @@ -288,7 +288,7 @@ schema XmlElementPrefix extends XmlElementPrefixDO { impl XmlElementPrefix { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlElementPrefix { + pub fn __all__(db: XmlDB) -> *XmlElementPrefix { for (tmp in XmlElementPrefixDO(db)) { yield XmlElementPrefix { name : tmp.name, @@ -330,7 +330,7 @@ schema XmlElementName extends XmlElementNameDO { impl XmlElementName { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlElementName { + pub fn __all__(db: XmlDB) -> *XmlElementName { for (tmp in XmlElementNameDO(db)) { yield XmlElementName { name : tmp.name, @@ -372,7 +372,7 @@ schema XmlElement extends XmlElementDO { impl XmlElement { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlElement { + pub fn __all__(db: XmlDB) -> *XmlElement { for (tmp in XmlElementDO(db)) { yield XmlElement { id : tmp.id, @@ -526,7 +526,7 @@ schema XmlFile extends XmlFileDO { impl XmlFile { @data_constraint @inline - fn __all__(db: XmlDB) -> *XmlFile { + pub fn __all__(db: XmlDB) -> *XmlFile { for (tmp in XmlFileDO(db)) { yield XmlFile { id : tmp.id, @@ -545,7 +545,7 @@ schema Location extends LocationDO { impl Location { @data_constraint @inline - fn __all__(db: XmlDB) -> *Location { + pub fn __all__(db: XmlDB) -> *Location { for (tmp in LocationDO(db)) { yield Location { id : tmp.id, diff --git a/tutorial/README.md b/tutorial/README.md new file mode 100644 index 00000000..1a6f6151 --- /dev/null +++ b/tutorial/README.md @@ -0,0 +1,96 @@ +## CodeFuse-Query使用教程 + +我们编写了Jupyter Notebook形式的教程,你可以使用项目配置的开发容器(devcontainer) 来体验 CodeFuse-Query,在阅读的同时执行代码,观察执行结果,也可以修改代码观察反馈,亲手体验 CodeFuse-Query 强大的自定义分析能力。 + +关于教程所运行的开发容器,你可以使用 GitHub Codespaces 功能进行远程加载体验,无需额外配置开发环境,通过浏览器访问,享受远程访问的便利性;也可以使用 VS Code在本地使用开发容器(dev container)功能体验 CodeFuse-Query 的使用教程(需要本地预装 VS Code和 Docker)。 + +#### 扩展阅读 +- [Github Codespaces](https://github.com/features/codespaces) +- [Jupyter Notebook](https://jupyter.org/) +- [VS Code devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) + +### 1. 使用 Github Codespaces 来体验CodeFuse-Query分析能力 + +#### 体验步骤 +1. 创建 Codespaces。依次点击项目首页的 Code -> Codespaces,在当前分支创建一个 Codespaces。 +2. 创建后,打开该 Codespaces,加载完成后,切换至项目 tutorial/notebook 目录下。 +3. 选择示例下的 Jupyter Notebook 分析教程,即ipynb文件。 +4. 在右上角的 "选择内核" 弹出框中,依次选择 "Jupyter Kernel..." -> "Godel Kernel"。 +5. 开始体验。 + +### 2. 使用 VS Code 本地开发容器来体验CodeFuse-Query分析能力 + +#### 体验步骤 +1. 克隆代码到本地,然后使用VS Code 打开项目 +2. VS Code 会自动检测到 devcontainer 配置文件( .devcontainer/devcontainer.json)。它将会提示你是否要重新打开仓库以应用 devcontainer 配置。点击「重新打开」按钮即可。 +3. 加载完成后,切换至项目 tutorial/notebook 目录下 +4. 选择示例下的 Jupyter Notebook 分析教程,即可开始体验 + +**注意**:执行第2步前,需要确保你的 VS Code 预先安装了 Dev Containners 扩展插件(扩展ID:`ms-vscode-remote.remote-containers`)或者 Remote Development 扩展套件(扩展ID:`ms-vscode-remote.vscode-remote-extensionpack`,该套件包含 Dev Containners 扩展)。如果还未安装,你可以在扩展商店通过扩展 ID 进行搜索安装。 + +## Jupyter kernel for CodeFuse-Query 介绍 +Jupyter kernel for CodeFuse-Query(以下称 Godel Kernel) 是 Jupyter 的一个特定内核,它为 Jupyter 环境提供了与 CodeFuse-Query 相关的交互式功能。该内核提供以下能力: +- 支持在 Jupyter Notebook 中编写和执行 Godel 脚本。 +- 支持 `%%python` 命令编写并执行 Python 代码,以便对查询到的数据进行更深入的数据可视化和数据后处理操作。 +- 支持自定义COREF db路径。 +- 转储Jupyter cell的输出结果到特定文件。 + +关于这些功能的详细介绍请看下一章节《Godel Kernel 用法介绍》。 + +#### Godel Kernel 用法介绍 +##### 设置要查询的 COREF database + +使用 `%db /path/to/db` 魔法命令来设置COREF db路径,内核会读取这个值来进行查询,比如: + +```bash +%db ./db +``` + +> tips: 还可以用`!`来运行一些有用的bash命令,比如查看 CodeFuse-Query CLI(sparrow)是否存在: + +```rust +!which sparrow +``` + +##### 运行 Godel 查询 + +设置好db路径后可以直接写Godel脚本,Godel kernel会创建临时文件来保存当前运行的Godel脚本并调用`sparrow query run`命令来进行查询,结果返回以HTML格式显示: + + +```rust +// Write your query and run in the notebook +// ... +``` + + +`%db` 魔法命令可以写在 Godel 脚本的第一行: + + +```rust +%db ./db +// Write your query and run in the notebook +// ... +``` + + +可以通过 `%%save_to` cell魔法命令保存**上一次运行成功**的 query 结果到一个JSON文件,具体用法: +```bash +%%save_to ./query.json +``` + +##### 运行 Python 代码 + +可以通过 `%%python` 或者 `%python` 来运行 Python 代码,比如: + +```python +%%python +import pandas as pd +data = pd.read_json('./query.json') +data.sort_values('cmplx', ascending=False, inplace=True) +top_10 = data.head(10) +print(top_10) +``` + +```python +%python print('hello') +``` diff --git a/tutorial/notebook/go_analysis.ipynb b/tutorial/notebook/go_analysis.ipynb new file mode 100644 index 00000000..85b8f259 --- /dev/null +++ b/tutorial/notebook/go_analysis.ipynb @@ -0,0 +1,402 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "这是一个使用 CodeFuse-Query 分析 Go 项目的教程。在教程中,你将体验到使用命令行工具对代码仓库进行数据化,然后使用 Godel 语言来分析这个仓库。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "检查cli是否就绪" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/sparrow-cli/sparrow\n", + "\n" + ] + } + ], + "source": [ + "!which sparrow" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 0: 克隆要分析的仓库。我们以 [gorm](https://github.com/go-gorm/gorm.git) 项目为例。" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-22T08:30:58.387715Z", + "start_time": "2023-11-22T08:30:44.572634Z" + } + }, + "outputs": [], + "source": [ + "!git clone https://github.com/go-gorm/gorm.git -q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 1: 代码数据化。使用 `sparrow database create` 命令创建一个db文件,指定待分析的仓库地址(当前目录下的gorm子目录),分析的语言(go),以及db文件的存储路径(放置在当前目录下的/db/gorm)。执行该命令之后,就会生成一份db文件,该文件存储着代码仓库的结构化数据,之后的分析就是针对这份数据进行。" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-23T03:46:32.220317Z", + "start_time": "2023-11-23T03:46:12.785705Z" + } + }, + "outputs": [], + "source": [ + "!sparrow database create --source-root gorm --data-language-type go --output ./db/gorm --overwrite > /dev/null" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 2: 使用Godel分析语言分析db文件。在本教程中,可以点击代码左侧的执行按钮,或使用快捷键:`Shift+Enter`,直接运行分析脚本。这里使用 `%db /path/to/db` 魔法命令来设置COREF db路径,内核会读取这个值来进行query查询。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "示例 查询 [gorm](https://github.com/go-gorm/gorm.git) 的文件代码复杂度信息。\n", + "\n", + "第一行通过内核魔法命令指定分析的db路径,后面写查询文件代码复杂度Godel脚本。" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/workspaces/CodeFuse-Query/tutorial/notebook/db/gorm\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[0;31mSparrow database is set to: /workspaces/CodeFuse-Query/tutorial/notebook/db/gorm\n", + "\u001b[0m" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-12-06 07:42:29,249 INFO: sparrow 2.0.0\n", + " will start\n", + "2023-12-06 07:42:29,249 INFO: database /workspaces/CodeFuse-Query/tutorial/notebook/db/gorm/coref_go_src.db size: 42.32 MB\n", + "2023-12-06 07:42:29,250 INFO: execute : /sparrow-cli/godel-script/usr/bin/godel /tmp/godel-jupyter-t7lsy12n/query.gdl -p /sparrow-cli/lib-1.0 -o /tmp/tmphp2bm3pi.gdl\n", + "2023-12-06 07:42:29,314 INFO: godel-script compile time: 0.06s\n", + "2023-12-06 07:42:29,315 INFO: execute : /sparrow-cli/godel-1.0/usr/bin/godel /tmp/tmphp2bm3pi.gdl --run-souffle-directly --package-path /sparrow-cli/lib-1.0 --souffle-fact-dir /workspaces/CodeFuse-Query/tutorial/notebook/db/gorm --souffle-output-format json --souffle-output-path /tmp/godel-jupyter-t7lsy12n/query.json\n", + "2023-12-06 07:42:39,655 INFO: Task /tmp/godel-jupyter-t7lsy12n/query.gdl is success, result is NOT-EMPTY, execution time is 10.41s.\n", + "2023-12-06 07:42:39,656 INFO: run success\n", + "\n", + "Total results: 942\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
namefunccmplxslel
0association.goDelete20197361
1association.goUnscoped14451
2association.goFind25358
3association.goAssociation42142
4association.goCount2367372
..................
937tests/preload_test.goTestPreloadEmptyData5215235
938tests/preload_test.goTestPreloadGoroutine2237253
939tests/preload_test.goTestPreloadWithDiffModel2255271
940tests/preload_test.goTestNestedPreloadWithUnscoped4273308
941tests/preload_test.goTestEmbedPreload2310445
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%db ./db/gorm\n", + "// script\n", + "use coref::go::*\n", + "\n", + "fn default_db() -> GoDB {\n", + " return GoDB::load(\"coref_go_src.db\")\n", + "}\n", + "\n", + "/**\n", + " * @param name: 文件名\n", + " * @param func: 函数名\n", + " * @param cmplx: 函数圈复杂度\n", + " * @param sl,el,sc,ec: 函数位置信息,依次为函数起始行,结束行\n", + " */\n", + "fn out(name: string, func: string, cmplx: int, sl: int, el: int) -> bool {\n", + " for(f in GoFile(default_db()), function in Function(default_db())) {\n", + " if ((!f.isAutoGenereatedFile()) &&\n", + " f.key_eq(function.getBelongsFile()) &&\n", + " name = f.getName() &&\n", + " func = function.getName() &&\n", + " cmplx = function.getCyclomaticComplexity() &&\n", + " sl = function.getLocation().getStartLineNumber() &&\n", + " el = function.getLocation().getEndLineNumber()) {\n", + " return true\n", + " }\n", + " }\n", + "}\n", + "\n", + "fn main() {\n", + " output(out())\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "保存上一次运行的 query 结果保存到一个JSON文件" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Query result saved to /workspaces/CodeFuse-Query/tutorial/notebook/query.json\n" + ] + } + ], + "source": [ + "%%save_to ./query.json" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 3: 好了,你可以针对分析生成的结果,进行进一步的代码分析了,比如你可以结合pandas库,使用刚刚生成的 query.json 实现最大函数复杂度Top 10的排序查询:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-23T03:54:56.998681Z", + "start_time": "2023-11-23T03:54:56.976694Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " name func cmplx sl el\n", + "428 schema/field.go ParseField 110 99 436\n", + "18 callbacks/update.go ConvertToAssignments 69 131 304\n", + "309 schema/schema.go ParseWithSpecialTableName 68 121 370\n", + "130 callbacks/create.go ConvertToCreateValues 64 217 385\n", + "234 scan.go Scan 62 125 342\n", + "30 statement.go BuildCondition 61 284 465\n", + "429 schema/field.go setupValuerAndSetter 46 439 969\n", + "729 tests/migrate_test.go TestMigrateColumns 44 517 645\n", + "11 callbacks/query.go BuildQuerySQL 41 33 266\n", + "281 migrator/migrator.go MigrateColumn 41 441 542\n" + ] + } + ], + "source": [ + "%%python\n", + "import pandas as pd\n", + "data = pd.read_json('./query.json')\n", + "data.sort_values('cmplx', ascending=False, inplace=True)\n", + "top_10 = data.head(10)\n", + "print(top_10)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "Enjoy!" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Godel kernel", + "language": "rust", + "name": "godel-jupyter" + }, + "language_info": { + "file_extension": ".gdl", + "help_links": [ + { + "text": "Godel kernel Magics", + "url": "https://sparrow.alipay.com" + } + ], + "mimetype": "text/rust", + "name": "rust", + "version": "0.0.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tutorial/notebook/java_analysis.ipynb b/tutorial/notebook/java_analysis.ipynb new file mode 100644 index 00000000..f45c205f --- /dev/null +++ b/tutorial/notebook/java_analysis.ipynb @@ -0,0 +1,234 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Java 分析示例\n", + "这是一个使用CodeFuse-Query分析java项目的教程。在教程中,你将体验到使用命令行工具对代码仓库进行数据化,然后使用Godel语言来分析这个仓库。" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 0: 克隆要分析的仓库。我们以蚂蚁集团的 SOFABolt 项目为例。" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "!git clone https://github.com/sofastack/sofa-bolt.git -q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 1: 代码数据化。使用 `sparrow database create` 命令创建一个db文件,需要指定待分析的仓库地址,分析的语言,以及db文件的存储路径。该文件存储着代码仓库的结构化数据,之后的分析就是针对这份数据进行。" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "!sparrow database create --source-root sofa-bolt --data-language-type java --output ./db/sofa-bolt --overwrite > /dev/null" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 2: 使用Godel分析语言分析db文件。在本教程中,可以点击代码左侧的执行按钮,直接运行分析脚本。在命令行中,你可以使用 `sparrow query run` 命令来执行查询脚本,具体可以使用`sparrow query run -h` 来获取详细参数信息。\n", + "在这个例子中,我们使用Godel语言查询了全仓库的类方法。你也可以在where子句中加入过滤条件,获取你想要的结果。" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-bolt\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[0;31mSparrow database is set to: /workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-bolt\n", + "\u001b[0m" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-12-06 07:45:32,507 INFO: sparrow 2.0.0\n", + " will start\n", + "2023-12-06 07:45:32,507 INFO: database /workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-bolt/coref_java_src.db size: 30.49 MB\n", + "2023-12-06 07:45:32,508 INFO: execute : /sparrow-cli/godel-script/usr/bin/godel /tmp/godel-jupyter-w6r7dgnm/query.gdl -p /sparrow-cli/lib-1.0 -o /tmp/tmpycrdkpyy.gdl\n", + "2023-12-06 07:45:32,673 INFO: godel-script compile time: 0.16s\n", + "2023-12-06 07:45:32,673 INFO: execute : /sparrow-cli/godel-1.0/usr/bin/godel /tmp/tmpycrdkpyy.gdl --run-souffle-directly --package-path /sparrow-cli/lib-1.0 --souffle-fact-dir /workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-bolt --souffle-output-format json --souffle-output-path /tmp/godel-jupyter-w6r7dgnm/query.json\n", + "2023-12-06 07:45:40,305 INFO: Task /tmp/godel-jupyter-w6r7dgnm/query.gdl is success, result is NOT-EMPTY, execution time is 7.80s.\n", + "2023-12-06 07:45:40,305 INFO: run success\n", + "\n", + "Total results: 1730\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
classNamemethodNamemethodSignature
0com.alipay.remoting.ConnectionConnectioncom.alipay.remoting.Connection.Connection:null...
1com.alipay.remoting.ConnectionConnectioncom.alipay.remoting.Connection.Connection:null...
2com.alipay.remoting.ConnectionConnectioncom.alipay.remoting.Connection.Connection:null...
3com.alipay.remoting.ConnectionConnectioncom.alipay.remoting.Connection.Connection:null...
4com.alipay.remoting.ConnectionisFinecom.alipay.remoting.Connection.isFine:boolean()
............
1725com.alipay.remoting.util.NettyEventLoopUtilnewEventLoopGroupcom.alipay.remoting.util.NettyEventLoopUtil.ne...
1726com.alipay.remoting.util.NettyEventLoopUtilgetServerSocketChannelClasscom.alipay.remoting.util.NettyEventLoopUtil.ge...
1727com.alipay.remoting.util.NettyEventLoopUtilenableTriggeredModecom.alipay.remoting.util.NettyEventLoopUtil.en...
1728com.alipay.remoting.util.NettyEventLoopUtilgetClientSocketChannelClasscom.alipay.remoting.util.NettyEventLoopUtil.ge...
1729com.alipay.remoting.codec.ProtocolCodeBasedDec...testDecodeIllegalPacketcom.alipay.remoting.codec.ProtocolCodeBasedDec...
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%db db/sofa-bolt\n", + "// script\n", + "use coref::java::{Callable, Class, Interface, JavaDB}\n", + "\n", + "fn db() -> JavaDB {\n", + " return JavaDB::load(\"coref_java_src.db\")\n", + "}\n", + "\n", + "query class_method from\n", + " m in Callable(db()),\n", + " c in Class(db())\n", + "where\n", + " c.key_eq(m.getBelongedClass())\n", + "select\n", + " c.getQualifiedName() as className,\n", + " m.getName() as methodName,\n", + " m.getSignature() as methodSignature" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Godel kernel", + "language": "rust", + "name": "godel-jupyter" + }, + "language_info": { + "file_extension": ".gdl", + "help_links": [ + { + "text": "Godel kernel Magics", + "url": "https://sparrow.alipay.com" + } + ], + "mimetype": "text/rust", + "name": "rust", + "version": "0.0.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tutorial/notebook/javascript_analysis.ipynb b/tutorial/notebook/javascript_analysis.ipynb new file mode 100644 index 00000000..c7648f2f --- /dev/null +++ b/tutorial/notebook/javascript_analysis.ipynb @@ -0,0 +1,772 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "这是一个使用CodeFuse-Query分析JavaScript项目的教程。在教程中,你将体验到使用命令行工具对代码仓库进行数据化,然后使用Godel语言来分析这个仓库。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "检查cli是否就绪" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/sparrow-cli/sparrow\n", + "\n" + ] + } + ], + "source": [ + "!which sparrow" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 0: 克隆要分析的仓库。我们以 [axios](https://github.com/axios/axios.git) 项目为例。" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-22T08:30:58.387715Z", + "start_time": "2023-11-22T08:30:44.572634Z" + } + }, + "outputs": [], + "source": [ + "!git clone https://github.com/axios/axios.git -q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 1: 代码数据化。使用 `sparrow database create` 命令创建一个db文件,指定待分析的仓库地址(当前目录下的axios子目录),分析的语言(javscript),以及db文件的存储路径(放置在当前目录下的/db/axios)。执行该命令之后,会生成一份db文件,该文件存储着代码仓库的结构化数据,之后的分析就是针对这份数据进行的。" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-23T03:46:32.220317Z", + "start_time": "2023-11-23T03:46:12.785705Z" + } + }, + "outputs": [], + "source": [ + "!sparrow database create --source-root axios --data-language-type javascript --output ./db/axios --overwrite > /dev/null" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 2: 使用Godel分析语言分析db文件。在本教程中,可以点击代码左侧的执行按钮,或使用快捷键:`Shift+Enter`,直接运行分析脚本。这里使用 `%db /path/to/db` 魔法命令来设置COREF db路径,内核会读取这个值来进行query查询" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "**示例** 查询 [axios](https://github.com/axios/axios.git) 函数级别的变更影响分析" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/workspaces/CodeFuse-Query/tutorial/notebook/db/axios\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[0;31mSparrow database is set to: /workspaces/CodeFuse-Query/tutorial/notebook/db/axios\n", + "\u001b[0m" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-12-06 07:51:24,946 INFO: sparrow 2.0.0\n", + " will start\n", + "2023-12-06 07:51:24,946 INFO: database /workspaces/CodeFuse-Query/tutorial/notebook/db/axios/coref_javascript_src.db size: 20.83 MB\n", + "2023-12-06 07:51:24,947 INFO: execute : /sparrow-cli/godel-script/usr/bin/godel /tmp/godel-jupyter-1b0jlan2/query.gdl -p /sparrow-cli/lib-1.0 -o /tmp/tmppjrr74c0.gdl\n", + "2023-12-06 07:51:25,462 INFO: godel-script compile time: 0.52s\n", + "2023-12-06 07:51:25,463 INFO: execute : /sparrow-cli/godel-1.0/usr/bin/godel /tmp/tmppjrr74c0.gdl --run-souffle-directly --package-path /sparrow-cli/lib-1.0 --souffle-fact-dir /workspaces/CodeFuse-Query/tutorial/notebook/db/axios --souffle-output-format json --souffle-output-path /tmp/godel-jupyter-1b0jlan2/query.json\n", + "2023-12-06 07:51:42,014 INFO: Task /tmp/godel-jupyter-1b0jlan2/query.gdl is success, result is NOT-EMPTY, execution time is 17.07s.\n", + "2023-12-06 07:51:42,014 INFO: run success\n", + "\n", + "Total results: 929\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
functionsignaturefunctionPathstartLineendLineeffectedFunctioneffectedSignatureeffectedFunctionPatheffectedStartLineeffectedEndLine
0-9156169672968821161(method) AxiosHeaders.from(thing: any): AxiosH...lib/core/AxiosHeaders.js248250-8249170294854635473(local function) onAdapterRejection(reason: an...lib/core/dispatchRequest.js6480
1-9156169672968821161(method) AxiosHeaders.from(thing: any): AxiosH...lib/core/AxiosHeaders.js2482501405045491285225472(local function) onloadend(): voidlib/adapters/xhr.js92121
2-9156169672968821161(method) AxiosHeaders.from(thing: any): AxiosH...lib/core/AxiosHeaders.js2482501808319753094699064(local function) dispatchHttpRequest(resolve: ...lib/adapters/http.js161678
3-9156169672968821161(method) AxiosHeaders.from(thing: any): AxiosH...lib/core/AxiosHeaders.js2482502322743179144353808(local function) onAdapterResolution(response:...lib/core/dispatchRequest.js5164
4-9156169672968821161(method) AxiosHeaders.from(thing: any): AxiosH...lib/core/AxiosHeaders.js2482503763705685345704826function transformData(fns: Array | {}, respon...lib/core/transformData.js1528
.................................
9249099947820526391919function toFormData(obj: any, formData: string...lib/helpers/toFormData.js862178914351007635312770(local function) dispatchXhrRequest(resolve: a...lib/adapters/xhr.js49259
9259099947820526391919function toFormData(obj: any, formData: string...lib/helpers/toFormData.js862179177673545987323723(method) Axios.getUri(config: any): stringlib/core/Axios.js161165
9269144720937035304957function generateReadableStream(length?: numbe...test/unit/adapters/http.js126144278810980780541004(local function)(): anytest/unit/adapters/http.js864889
9279144720937035304957function generateReadableStream(length?: numbe...test/unit/adapters/http.js1261449144720937035304957function generateReadableStream(length?: numbe...test/unit/adapters/http.js126144
9289169288528567851304(local function) lib$es6$promise$$internal$$in...test/manual/promise.js99-3637370147032562987class lib$es6$promise$promise$$Promise\\n(local...test/manual/promise.js99
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%db ./db/axios\n", + "// script\n", + "use coref::javascript::*\n", + "\n", + "fn default_db() -> JavascriptDB {\n", + " return JavascriptDB::load(\"coref_javascript_src.db\")\n", + "}\n", + "\n", + "fn getACallerFunction(function: FunctionLikeDeclaration, callerFunction: FunctionLikeDeclaration) -> bool {\n", + " for (mayInvokeExpression in MayInvokeExpression(default_db())) {\n", + " if (mayInvokeExpression in function.getACallSite() &&\n", + " callerFunction = mayInvokeExpression.getEnclosingFunction()) {\n", + " return true\n", + " }\n", + " }\n", + "}\n", + "\n", + "fn getAnEffectedFunction(function: FunctionLikeDeclaration, effectedFunction: FunctionLikeDeclaration) -> bool {\n", + " if (getACallerFunction(function, effectedFunction)) {\n", + " return true\n", + " }\n", + " for (callerFunction in FunctionLikeDeclaration(default_db())) {\n", + " if (getACallerFunction(function, callerFunction) &&\n", + " getAnEffectedFunction(callerFunction, effectedFunction)) {\n", + " return true\n", + " }\n", + " }\n", + "}\n", + "\n", + "/**\n", + " * Query the effected functions according to the changed lines.\n", + " *\n", + " * @param function the changed function id\n", + " * @param signature the changed function signature\n", + " * @param functionPath the changed function file path\n", + " * @param startLine the changed function start line\n", + " * @param endLine the changed function end line\n", + " * @param effectedFunction the effected function id\n", + " * @param effectedSignature the effected function signature\n", + " * @param effectedFunctionPath the effected function file path\n", + " * @param effectedStartLine the effected function start line\n", + " * @param effectedEndLine the effected function end line\n", + " */\n", + "fn out(\n", + " function: FunctionLikeDeclaration,\n", + " signature: string,\n", + " functionPath: string,\n", + " startLine: int,\n", + " endLine: int,\n", + " effectedFunction: FunctionLikeDeclaration,\n", + " effectedSignature: string,\n", + " effectedFunctionPath: string,\n", + " effectedStartLine: int,\n", + " effectedEndLine: int\n", + ") -> bool {\n", + " if (getAnEffectedFunction(function, effectedFunction)) {\n", + " let (symbol = function.getSymbol(),\n", + " effectedSymbol = effectedFunction.getSymbol(),\n", + " location = function.getLocation(),\n", + " effectedLocation = effectedFunction.getLocation()) {\n", + " if (signature = symbol.getDescription() &&\n", + " effectedSignature = effectedSymbol.getDescription() &&\n", + " functionPath = location.getRelativePath() &&\n", + " startLine = location.getStartLineNumber() &&\n", + " endLine = location.getEndLineNumber() &&\n", + " effectedFunctionPath = effectedLocation.getRelativePath() &&\n", + " effectedStartLine = effectedLocation.getStartLineNumber() &&\n", + " effectedEndLine = effectedLocation.getEndLineNumber()) {\n", + " return true\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "fn main() {\n", + " output(out())\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "保存上一次运行的 query 结果保存到一个JSON文件" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Query result saved to /workspaces/CodeFuse-Query/tutorial/notebook/query.json\n" + ] + } + ], + "source": [ + "%%save_to ./query.json" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 3: 现在可以针对分析生成的结果,进行进一步的代码分析了,假设我们要分析`'lib/core/AxiosHeaders.js'`文件的变更有可能会影响到哪一些函数,我们可以这么进行分析:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Modification of file lib/core/AxiosHeaders.js for the following function might have impacts:\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `(local function) onAdapterRejection(reason: any): any` in lib/core/dispatchRequest.js at line 64\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `(local function) onloadend(): void` in lib/adapters/xhr.js at line 92\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `(local function) onAdapterResolution(response: any): any` in lib/core/dispatchRequest.js at line 51\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `function transformData(fns: Array | {}, response: any | null): any` in lib/core/transformData.js at line 15\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `function dispatchRequest(config: object): Promise` in lib/core/dispatchRequest.js at line 34\n", + " --> `(method) AxiosHeaders.from(thing: any): AxiosHeaders` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(local function)(request: any): void` in test/specs/defaults.spec.js at line 152\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `function createInstance(defaultConfig: any): Axios` in lib/axios.js at line 28\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(method) Axios.request(configOrUrl: string | any, config: any | null): Promise` in lib/core/Axios.js at line 38\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(local function)(url: any, config: any): Promise` in lib/core/Axios.js at line 171\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 396\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(local function) create(instanceConfig: any): Axios` in lib/axios.js at line 39\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 409\n", + " --> `(method) AxiosHeaders.concat(first: any, ...targets: {}): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 383\n", + " --> `(method) AxiosHeaders.clear(matcher: any): boolean` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 259\n", + " --> `(method) AxiosHeaders.clear(matcher: any): boolean` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 251\n", + " --> `(method) AxiosHeaders.toString(): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 422\n", + " --> `(local function) defineAccessor(_header: any): void` might impact `(method) AxiosHeaders.accessor(header: any): typeof AxiosHeaders` in lib/core/AxiosHeaders.js at line 260\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `function normalizeValue(value: any): any` might impact `function(value: any, header: any): void` in lib/core/AxiosHeaders.js at line 199\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `function normalizeValue(value: any): any` might impact `function(_value: any, _header: any): void` in lib/core/AxiosHeaders.js at line 97\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `function normalizeValue(value: any): any` might impact `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 79\n", + " --> `function normalizeValue(value: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `function normalizeValue(value: any): any` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `function normalizeValue(value: any): any` might impact `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` in lib/core/AxiosHeaders.js at line 82\n", + " --> `function normalizeValue(value: any): any` might impact `function(formHeaders: any): void` in lib/adapters/http.js at line 287\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `function normalizeValue(value: any): any` might impact `function(target: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 255\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `function normalizeValue(value: any): any` might impact `constructor AxiosHeaders.__constructor` in lib/core/AxiosHeaders.js at line 75\n", + " --> `function normalizeValue(value: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `function normalizeValue(value: any): any` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(request: any): void` in test/specs/defaults.spec.js at line 152\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 356\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 371\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `function(thing: any): any` in lib/core/mergeConfig.js at line 6\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(method) AxiosHeaders.toString(): any` in lib/core/AxiosHeaders.js at line 240\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(method) AxiosHeaders[Symbol.iterator](): any` in lib/core/AxiosHeaders.js at line 236\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 396\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 259\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 409\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 342\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 271\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 422\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 251\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `function(a: any, b: any): any` in lib/core/mergeConfig.js at line 96\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(method) AxiosHeaders.toJSON(asStrings: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 383\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 6\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `function parseTokens(str: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `function parseTokens(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `function parseTokens(str: any): any` might impact `(method) AxiosHeaders.get(header: any, parser: any): any` in lib/core/AxiosHeaders.js at line 110\n", + " --> `function formatHeader(header: any): any` might impact `function(value: any, header: any): void` in lib/core/AxiosHeaders.js at line 199\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `(method) AxiosHeaders.has(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `function(formHeaders: any): void` in lib/adapters/http.js at line 287\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `function(target: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 255\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `constructor AxiosHeaders.__constructor` in lib/core/AxiosHeaders.js at line 75\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(method) AxiosHeaders.clear(matcher: any): boolean` in lib/core/AxiosHeaders.js at line 179\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 259\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(method) AxiosHeaders.has(header: any, matcher: any): boolean` in lib/core/AxiosHeaders.js at line 140\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function) deleteHeader(_header: any): void` in lib/core/AxiosHeaders.js at line 156\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` in lib/core/AxiosHeaders.js at line 152\n", + " --> `function matchHeaderValue(context: any, value: any, header: any, filter: any, isHeaderNameFilter: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 251\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 79\n", + " --> `function(headers: any, _rewrite: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `function(headers: any, _rewrite: any): any` might impact `function(formHeaders: any): void` in lib/adapters/http.js at line 287\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `function(headers: any, _rewrite: any): any` might impact `function(target: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 255\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `function(headers: any, _rewrite: any): any` might impact `constructor AxiosHeaders.__constructor` in lib/core/AxiosHeaders.js at line 75\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `function(headers: any, _rewrite: any): any` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `function(_value: any, _header: any): void` in lib/core/AxiosHeaders.js at line 97\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 79\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `function(formHeaders: any): void` in lib/adapters/http.js at line 287\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `function(target: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 255\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `constructor AxiosHeaders.__constructor` in lib/core/AxiosHeaders.js at line 75\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `function(str: any): any` might impact `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 79\n", + " --> `function(str: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `function(str: any): any` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `function(str: any): any` might impact `function(formHeaders: any): void` in lib/adapters/http.js at line 287\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `function(str: any): any` might impact `function(target: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 255\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `function(str: any): any` might impact `constructor AxiosHeaders.__constructor` in lib/core/AxiosHeaders.js at line 75\n", + " --> `function(str: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `function(str: any): any` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 356\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 371\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `(local function) transform(fn: any): void` in lib/core/transformData.js at line 21\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `function transformData(fns: Array | {}, response: any | null): any` in lib/core/transformData.js at line 15\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 342\n", + " --> `(method) AxiosHeaders.normalize(format: any): AxiosHeaders` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `(local function) deleteHeader(_header: any): void` might impact `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` in lib/core/AxiosHeaders.js at line 152\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 127\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `function normalizeHeader(header: any): any` might impact `function(_value: any, _header: any): void` in lib/core/AxiosHeaders.js at line 97\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function) defineAccessor(_header: any): void` in lib/core/AxiosHeaders.js at line 268\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 117\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 136\n", + " --> `function normalizeHeader(header: any): any` might impact `(method) AxiosHeaders.has(header: any, matcher: any): boolean` in lib/core/AxiosHeaders.js at line 140\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 6\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `function normalizeHeader(header: any): any` might impact `(method) AxiosHeaders.set(header: any, valueOrRewrite: any, rewrite: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 79\n", + " --> `function normalizeHeader(header: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function) setHeader(_value: any, _header: any, _rewrite: any): void` in lib/core/AxiosHeaders.js at line 82\n", + " --> `function normalizeHeader(header: any): any` might impact `function(formHeaders: any): void` in lib/adapters/http.js at line 287\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function) deleteHeader(_header: any): void` in lib/core/AxiosHeaders.js at line 156\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `function normalizeHeader(header: any): any` might impact `function(target: any): AxiosHeaders` in lib/core/AxiosHeaders.js at line 255\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 149\n", + " --> `function normalizeHeader(header: any): any` might impact `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` in lib/core/AxiosHeaders.js at line 152\n", + " --> `function normalizeHeader(header: any): any` might impact `constructor AxiosHeaders.__constructor` in lib/core/AxiosHeaders.js at line 75\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n", + " --> `function normalizeHeader(header: any): any` might impact `(method) AxiosHeaders.get(header: any, parser: any): any` in lib/core/AxiosHeaders.js at line 110\n", + " --> `function normalizeHeader(header: any): any` might impact `(method) AxiosHeaders.accessor(header: any): typeof AxiosHeaders` in lib/core/AxiosHeaders.js at line 260\n", + " --> `function normalizeHeader(header: any): any` might impact `(local function) dispatchXhrRequest(resolve: any, reject: any): void` in lib/adapters/xhr.js at line 49\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 161\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 232\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 198\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function) dispatchHttpRequest(resolve: any, reject: any, onDone: any): unknown` in lib/adapters/http.js at line 161\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 214\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 183\n", + " --> `(method) AxiosHeaders.delete(header: any, matcher: any): boolean` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 173\n", + " --> `function buildAccessors(obj: any, header: any): void` might impact `(local function) defineAccessor(_header: any): void` in lib/core/AxiosHeaders.js at line 268\n", + " --> `function buildAccessors(obj: any, header: any): void` might impact `(method) AxiosHeaders.accessor(header: any): typeof AxiosHeaders` in lib/core/AxiosHeaders.js at line 260\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 101\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 38\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 47\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 65\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 26\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 6\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 320\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `function(): void` in test/unit/core/AxiosHeaders.js at line 79\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 18\n", + " --> `(method) AxiosHeaders.get(header: any, parser: any): any` might impact `(local function)(): void` in test/unit/core/AxiosHeaders.js at line 92\n" + ] + } + ], + "source": [ + "%%python\n", + "import json\n", + "\n", + "with open('./query.json', 'r') as fp:\n", + " query_data = json.loads(fp.read())\n", + "\n", + "analysis_path = 'lib/core/AxiosHeaders.js'\n", + "print(f'Modification of file {analysis_path} for the following function might have impacts:')\n", + "for data in query_data:\n", + " if data['functionPath'] == analysis_path:\n", + " signature = data['signature']\n", + " functionPath = data['functionPath']\n", + " effectedSignature = data['effectedSignature']\n", + " effectedFunctionPath = data['effectedFunctionPath']\n", + " effectedStartLine = data['effectedStartLine']\n", + " print(f' --> `{signature}` might impact `{effectedSignature}` in {effectedFunctionPath} at line {effectedStartLine}')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Godel kernel", + "language": "rust", + "name": "godel-jupyter" + }, + "language_info": { + "file_extension": ".gdl", + "help_links": [ + { + "text": "Godel kernel Magics", + "url": "https://sparrow.alipay.com" + } + ], + "mimetype": "text/rust", + "name": "rust", + "version": "0.0.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tutorial/notebook/python_analysis.ipynb b/tutorial/notebook/python_analysis.ipynb new file mode 100644 index 00000000..54639896 --- /dev/null +++ b/tutorial/notebook/python_analysis.ipynb @@ -0,0 +1,411 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "这是一个使用 CodeFuse-Query 分析 Python 项目的教程。在教程中,你将体验到使用命令行工具对代码仓库进行数据化,然后使用 Godel 语言来分析这个仓库。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "检查cli是否就绪" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/sparrow-cli/sparrow\n", + "\n" + ] + } + ], + "source": [ + "!which sparrow" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 0: 克隆要分析的仓库。我们以 python 仓库 [requests](https://github.com/psf/requests.git) 项目为例。" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-22T08:30:58.387715Z", + "start_time": "2023-11-22T08:30:44.572634Z" + } + }, + "outputs": [], + "source": [ + "!git clone https://github.com/psf/requests.git -q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 1: 代码数据化。使用 `sparrow database create` 命令创建一个db文件,指定待分析的仓库地址(当前目录下的requests子目录),分析的语言(python),以及db文件的存储路径(放置在当前目录下的/db/requests)。执行该命令之后,就会生成一份db文件,该文件存储着代码仓库的结构化数据,之后的分析就是针对这份数据进行。" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-23T03:46:32.220317Z", + "start_time": "2023-11-23T03:46:12.785705Z" + } + }, + "outputs": [], + "source": [ + "!sparrow database create --source-root requests --data-language-type python --output ./db/requests --overwrite > /dev/null" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 2: 使用Godel分析语言分析db文件。在本教程中,可以点击代码左侧的执行按钮,或使用快捷键:`Shift+Enter`,直接运行分析脚本。这里使用 `%db /path/to/db` 魔法命令来设置COREF db路径,内核会读取这个值来进行query查询。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "示例 查询 [requests](https://github.com/psf/requests.git) 的文件注释率信息。\n", + "\n", + "第一行通过内核魔法命令指定分析的db路径,后面写查询文件代码注释率 Godel 脚本。" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/workspaces/CodeFuse-Query/tutorial/notebook/db/requests\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[0;31mSparrow database is set to: /workspaces/CodeFuse-Query/tutorial/notebook/db/requests\n", + "\u001b[0m" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-12-06 07:48:27,223 INFO: sparrow 2.0.0\n", + " will start\n", + "2023-12-06 07:48:27,223 INFO: database /workspaces/CodeFuse-Query/tutorial/notebook/db/requests/coref_python_src.db size: 5.99 MB\n", + "2023-12-06 07:48:27,224 INFO: execute : /sparrow-cli/godel-script/usr/bin/godel /tmp/godel-jupyter-9f9aj65w/query.gdl -p /sparrow-cli/lib-1.0 -o /tmp/tmp8tgaooo4.gdl\n", + "2023-12-06 07:48:27,288 INFO: godel-script compile time: 0.06s\n", + "2023-12-06 07:48:27,288 INFO: execute : /sparrow-cli/godel-1.0/usr/bin/godel /tmp/tmp8tgaooo4.gdl --run-souffle-directly --package-path /sparrow-cli/lib-1.0 --souffle-fact-dir /workspaces/CodeFuse-Query/tutorial/notebook/db/requests --souffle-output-format json --souffle-output-path /tmp/godel-jupyter-9f9aj65w/query.json\n", + "2023-12-06 07:48:29,410 INFO: Task /tmp/godel-jupyter-9f9aj65w/query.gdl is success, result is NOT-EMPTY, execution time is 2.19s.\n", + "2023-12-06 07:48:29,411 INFO: run success\n", + "\n", + "Total results: 643\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
namevaluepathslineeline
0httpbin1tests/conftest.py2627
1get_encodings_from_content1src/requests/utils.py484506
2request1src/requests/api.py1459
3cookiejar_from_dict6src/requests/cookies.py521539
4consume_socket_content4tests/testserver/server.py621
..................
638TestRequests.test_rewind_body_failed_seek.BadF...1tests/test_requests.py19711972
639TestSuperLen.test_super_len_handles_files_rais...1tests/test_utils.py7677
640TestSuperLen.test_super_len_handles_files_rais...1tests/test_utils.py7980
641TestSuperLen.test_super_len_with_no__len__.Len...1tests/test_utils.py133134
642TestRequests.test_custom_redirect_mixin.Custom...4tests/test_requests.py21962204
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%db ./db/requests\n", + "// script\n", + "use coref::python::*\n", + "\n", + "fn default_db() -> PythonDB {\n", + " return PythonDB::load(\"coref_python_src.db\")\n", + "}\n", + "\n", + "/**\n", + " * Get cyclomatic complexity of functions\n", + " *\n", + " * @param name function name\n", + " * @param value cyclomatic complexity of function\n", + " * @param path path of file including this function\n", + " * @param sline function start line\n", + " * @param eline function end line\n", + " */\n", + "fn getCyclomaticComplexity(\n", + " name: string,\n", + " value: int,\n", + " path: string,\n", + " sline: int,\n", + " eline: int) -> bool {\n", + " // get metric function\n", + " for (c in MetricFunction(default_db())) {\n", + " if (path = c.getLocation().getFile().getRelativePath() &&\n", + " name = c.getQualifiedName() &&\n", + " value = c.getCyclomaticComplexity() &&\n", + " sline = c.getLocation().getStartLineNumber() &&\n", + " eline = c.getLocation().getEndLineNumber()) {\n", + " return true\n", + " }\n", + " }\n", + "}\n", + "\n", + "fn main() {\n", + " output(getCyclomaticComplexity())\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "保存上一次运行的 query 结果保存到一个JSON文件" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Query result saved to /workspaces/CodeFuse-Query/tutorial/notebook/query.json\n" + ] + } + ], + "source": [ + "%%save_to ./query.json" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 3: 好了,你可以针对分析生成的结果,进行进一步的代码分析了,比如你可以结合pandas库,使用刚刚生成的 query.json 实现最大函数复杂度Top 10的排序查询:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-23T03:54:56.998681Z", + "start_time": "2023-11-23T03:54:56.976694Z" + }, + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " name value ... sline eline\n", + "354 RequestEncodingMixin._encode_files 21 ... 137 203\n", + "572 HTTPDigestAuth.build_digest_header 19 ... 126 234\n", + "232 HTTPAdapter.send 19 ... 433 537\n", + "145 PreparedRequest.prepare_body 17 ... 494 570\n", + "142 PreparedRequest.prepare_url 17 ... 409 481\n", + "26 should_bypass_proxies 15 ... 760 818\n", + "345 SessionRedirectMixin.resolve_redirects 15 ... 159 280\n", + "239 HTTPAdapter.cert_verify 14 ... 237 291\n", + "8 super_len 14 ... 133 196\n", + "68 get_netrc_auth 12 ... 199 253\n", + "\n", + "[10 rows x 5 columns]\n" + ] + } + ], + "source": [ + "%%python\n", + "import pandas as pd\n", + "data = pd.read_json('./query.json')\n", + "data.sort_values('value', ascending=False, inplace=True)\n", + "top_10 = data.head(10)\n", + "print(top_10)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "Enjoy!" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Godel kernel", + "language": "rust", + "name": "godel-jupyter" + }, + "language_info": { + "file_extension": ".gdl", + "help_links": [ + { + "text": "Godel kernel Magics", + "url": "https://sparrow.alipay.com" + } + ], + "mimetype": "text/rust", + "name": "rust", + "version": "0.0.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tutorial/notebook/xml_analysis.ipynb b/tutorial/notebook/xml_analysis.ipynb new file mode 100644 index 00000000..e27fce9a --- /dev/null +++ b/tutorial/notebook/xml_analysis.ipynb @@ -0,0 +1,445 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "这是一个使用CodeFuse-Query分析 XML 项目的教程。在教程中,你将体验到使用命令行工具对代码仓库进行数据化,然后使用Godel语言来分析这个仓库。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "检查cli是否就绪" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/sparrow-cli/sparrow\n", + "\n" + ] + } + ], + "source": [ + "!which sparrow" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 0: 克隆要分析的仓库。我们以 [sofa-boot](https://github.com/sofastack/sofa-boot.git) 项目为例。" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-22T08:30:58.387715Z", + "start_time": "2023-11-22T08:30:44.572634Z" + } + }, + "outputs": [], + "source": [ + "!git clone https://github.com/sofastack/sofa-boot.git -q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 1: 代码数据化。使用 `sparrow database create` 命令创建一个db文件,指定待分析的仓库地址(当前目录下的sofa-boot子目录),分析的语言(xml),以及db文件的存储路径(放置在当前目录下的/db/sofa-boot)。执行该命令之后,就会生成一份db文件,该文件存储着代码仓库的结构化数据,之后的分析就是针对这份数据进行。" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "ExecuteTime": { + "end_time": "2023-11-23T03:46:32.220317Z", + "start_time": "2023-11-23T03:46:12.785705Z" + } + }, + "outputs": [], + "source": [ + "!sparrow database create --source-root sofa-boot --data-language-type xml --output ./db/sofa-boot --overwrite > /dev/null" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "STEP 2: 使用Godel分析语言分析db文件。在本教程中,可以点击代码左侧的执行按钮,或使用快捷键:`Shift+Enter`,直接运行分析脚本。这里使用 `%db /path/to/db` 魔法命令来设置COREF db路径,内核会读取这个值来进行query查询。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "示例 查询 [sofa-boot](https://github.com/sofastack/sofa-boot.git) 的POM信息(如文件路径,引用的jar资源,版本信息)。\n", + "\n", + "第一行通过内核魔法命令指定分析的db路径,后面写查询POM信息Godel脚本。" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-boot\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\u001b[0;31mSparrow database is set to: /workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-boot\n", + "\u001b[0m" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-12-06 07:49:13,344 INFO: sparrow 2.0.0\n", + " will start\n", + "2023-12-06 07:49:13,345 INFO: database /workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-boot/coref_xml_src.db size: 908.00 KB\n", + "2023-12-06 07:49:13,345 INFO: execute : /sparrow-cli/godel-script/usr/bin/godel /tmp/godel-jupyter-q_z2i2by/query.gdl -p /sparrow-cli/lib-1.0 -o /tmp/tmph3yjtf_3.gdl\n", + "2023-12-06 07:49:13,361 INFO: godel-script compile time: 0.02s\n", + "2023-12-06 07:49:13,362 INFO: execute : /sparrow-cli/godel-1.0/usr/bin/godel /tmp/tmph3yjtf_3.gdl --run-souffle-directly --package-path /sparrow-cli/lib-1.0 --souffle-fact-dir /workspaces/CodeFuse-Query/tutorial/notebook/db/sofa-boot --souffle-output-format json --souffle-output-path /tmp/godel-jupyter-q_z2i2by/query.json\n", + "2023-12-06 07:49:13,678 INFO: Task /tmp/godel-jupyter-q_z2i2by/query.gdl is success, result is NOT-EMPTY, execution time is 0.33s.\n", + "2023-12-06 07:49:13,678 INFO: run success\n", + "\n", + "Total results: 105\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
fileNamem1m2m3
0sofa-boot-project/sofa-boot-parent/pom.xmlcom.puppycrawl.tools8.42checkstyle
1sofa-boot-project/sofa-boot-tools/sofa-boot-gr...org.springframework.boot3.1.2spring-boot-gradle-plugin
2sofa-boot-project/sofa-boot-tools/sofa-boot-gr...org.apache.commons1.19commons-compress
3sofa-boot-project/sofa-boot-tools/sofa-boot-gr...io.spring.gradle1.1.0dependency-management-plugin
4sofa-boot-project/sofaboot-dependencies/pom.xmlcom.alipay.sofa${sofa.ark.version}sofa-ark-springboot-starter
...............
100sofa-boot-tests/pom.xmlcom.alipay.sofa${sofa.boot.version}sofa-boot-smoke-tests-boot
101sofa-boot-tests/pom.xmlcom.alipay.sofa${sofa.boot.version}sofa-boot-smoke-tests-ark
102sofa-boot-tests/pom.xmlcom.alipay.sofa${sofa.boot.version}sofa-boot-smoke-tests-runtime
103sofa-boot-tests/pom.xmlcom.alipay.sofa${sofa.boot.version}sofa-boot-smoke-tests-tracer
104sofa-boot-tests/pom.xmlcom.alipay.sofa${sofa.boot.version}sofa-boot-smoke-tests-rpc
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%db ./db/sofa-boot\n", + "// script\n", + "use coref::xml::*\n", + "\n", + "schema DependencyElement extends XmlElement {}\n", + "\n", + "impl DependencyElement {\n", + " @data_constraint\n", + " pub fn __all__(db: XmlDB) -> *DependencyElement {\n", + " for(e in XmlElement(db)) {\n", + " if (e.getElementName() = \"dependency\") {\n", + " yield DependencyElement {\n", + " id: e.id,\n", + " location_id: e.location_id,\n", + " parent_id: e.parent_id,\n", + " index_order: e.index_order\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "schema GroupElement extends XmlElement {}\n", + "\n", + "impl GroupElement {\n", + " @data_constraint\n", + " pub fn __all__(db: XmlDB) -> *GroupElement {\n", + " for(e in XmlElement(db)) {\n", + " if (e.getElementName() = \"groupId\") {\n", + " yield GroupElement {\n", + " id: e.id,\n", + " location_id: e.location_id,\n", + " parent_id: e.parent_id,\n", + " index_order: e.index_order\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "schema VersionElement extends XmlElement {}\n", + "\n", + "impl VersionElement {\n", + " @data_constraint\n", + " pub fn __all__(db: XmlDB) -> *VersionElement {\n", + " for(e in XmlElement(db)) {\n", + " if (e.getElementName() = \"version\") {\n", + " yield VersionElement {\n", + " id: e.id,\n", + " location_id: e.location_id,\n", + " parent_id: e.parent_id,\n", + " index_order: e.index_order\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "schema ArtifactElement extends XmlElement {}\n", + "\n", + "impl ArtifactElement {\n", + " @data_constraint\n", + " pub fn __all__(db: XmlDB) -> *ArtifactElement {\n", + " for(e in XmlElement(db)) {\n", + " if (e.getElementName() = \"artifactId\") {\n", + " yield ArtifactElement {\n", + " id: e.id,\n", + " location_id: e.location_id,\n", + " parent_id: e.parent_id,\n", + " index_order: e.index_order\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "schema PomFile extends XmlFile {}\n", + "\n", + "impl PomFile {\n", + " @data_constraint\n", + " pub fn __all__(db: XmlDB) -> *PomFile {\n", + " for(f in XmlFile(db)) {\n", + " if (f.getFileName() = \"pom.xml\") {\n", + " yield PomFile {\n", + " id: f.id,\n", + " file_name: f.file_name,\n", + " relative_path: f.relative_path\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// output relative path of the file, referenced jar name and version\n", + "fn out(fileName: string, m1: string, m2: string, m3: string) -> bool {\n", + " let (db = XmlDB::load(\"coref_xml_src.db\")) {\n", + " for (f in PomFile(db),\n", + " e1 in GroupElement(db),\n", + " e2 in VersionElement(db),\n", + " e3 in ArtifactElement(db),\n", + " c1 in XmlCharacter(db),\n", + " c2 in XmlCharacter(db),\n", + " c3 in XmlCharacter(db),\n", + " p in DependencyElement(db)) {\n", + " if (f.key_eq(p.getLocation().getFile()) &&\n", + " fileName = f.getRelativePath() &&\n", + " p.key_eq(e1.getParent()) &&\n", + " e1.key_eq(c1.getBelongedElement()) &&\n", + " m1 = c1.getText() &&\n", + " p.key_eq(e2.getParent()) &&\n", + " e2.key_eq(c2.getBelongedElement()) &&\n", + " m2 = c2.getText() &&\n", + " p.key_eq(e3.getParent()) &&\n", + " e3.key_eq(c3.getBelongedElement()) &&\n", + " m3 = c3.getText()) {\n", + " return true\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "fn main() {\n", + " output(out())\n", + "}" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "保存上一次运行的 query 结果保存到一个 JSON/CSV 文件" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Query result saved to /workspaces/CodeFuse-Query/tutorial/notebook/query.csv\n" + ] + } + ], + "source": [ + "%%save_to ./query.csv" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "STEP 3: 好了,你可以针对分析生成的结果,进行进一步的代码分析了。" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "collapsed": false + }, + "source": [ + "Enjoy!" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Godel kernel", + "language": "rust", + "name": "godel-jupyter" + }, + "language_info": { + "file_extension": ".gdl", + "help_links": [ + { + "text": "Godel kernel Magics", + "url": "https://sparrow.alipay.com" + } + ], + "mimetype": "text/rust", + "name": "rust", + "version": "0.0.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}