mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Merge branch 'main' into redsun82/rust-typed-labels
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
{{#includes}}
|
||||
|
||||
// from {{src}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `{{name}}`.
|
||||
* INTERNAL: Do not import directly.
|
||||
@@ -9,7 +9,9 @@ private import {{import_prefix}}.Raw
|
||||
{{#imports}}
|
||||
import {{.}}
|
||||
{{/imports}}
|
||||
|
||||
{{#root}}
|
||||
private class {{name}}Alias = {{name}};
|
||||
{{/root}}
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `{{name}}` and should not
|
||||
* be referenced directly.
|
||||
@@ -22,7 +24,7 @@ module Generated {
|
||||
* INTERNAL: Do not reference the `Generated::{{name}}` class directly.
|
||||
* Use the subclass `{{name}}`, where the following predicates are available.
|
||||
*/
|
||||
class {{name}} extends Synth::T{{name}}{{#bases}}, {{.}}{{/bases}} {
|
||||
class {{name}} extends Synth::T{{name}}{{#bases_impl}}, {{.}}{{/bases_impl}} {
|
||||
{{#root}}
|
||||
/**
|
||||
* Gets the string representation of this element.
|
||||
@@ -49,13 +51,13 @@ module Generated {
|
||||
* Classes can override this to indicate this node should be in the "hidden" AST, mostly reserved
|
||||
* for conversions and syntactic sugar nodes like parentheses.
|
||||
*/
|
||||
{{name}} getResolveStep() { none() } // overridden by subclasses
|
||||
{{name}}Alias getResolveStep() { none() } // overridden by subclasses
|
||||
|
||||
/**
|
||||
* Gets the element that should substitute this element in the explicit AST, applying `getResolveStep`
|
||||
* transitively.
|
||||
*/
|
||||
final {{name}} resolve() {
|
||||
final {{name}}Alias resolve() {
|
||||
not exists(this.getResolveStep()) and result = this
|
||||
or
|
||||
result = this.getResolveStep().resolve()
|
||||
|
||||
12
misc/codegen/templates/ql_class_public.mustache
Normal file
12
misc/codegen/templates/ql_class_public.mustache
Normal file
@@ -0,0 +1,12 @@
|
||||
// generated by {{generator}}, do not edit
|
||||
/**
|
||||
* This module provides the public class `{{name}}`.
|
||||
*/
|
||||
|
||||
private import {{name}}Impl
|
||||
{{#imports}}
|
||||
import {{.}}
|
||||
{{/imports}}
|
||||
|
||||
{{>ql_stub_class_qldoc}}
|
||||
final class {{name}} = Impl::{{name}};
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
/**
|
||||
* This module exports all modules providing `Element` subclasses.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
/**
|
||||
* This module provides the generated parent/child relationship.
|
||||
*/
|
||||
|
||||
@@ -6,10 +6,16 @@ private import {{import_prefix}}.Raw
|
||||
private import {{import_prefix}}.Synth
|
||||
{{/has_synth_accessors}}
|
||||
|
||||
{{>ql_stub_class_qldoc}}
|
||||
class {{name}} extends Generated::{{name}} {
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `{{name}}` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
{{>ql_stub_class_qldoc}}
|
||||
class {{name}} extends Generated::{{name}} {
|
||||
{{#synth_accessors}}
|
||||
private
|
||||
cached {{type}} getUnderlying{{argument}}() { this = Synth::T{{name}}({{#constructorparams}}{{^first}},{{/first}}{{param}}{{/constructorparams}})}
|
||||
{{/synth_accessors}}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `{{name}}`.
|
||||
{{#internal}}
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
{{/internal}}
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
|
||||
import {{elements_module}}
|
||||
import TestUtils
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
|
||||
After a source file is added in this directory and {{generator}} is run again, test queries
|
||||
will appear and this file will be deleted
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
|
||||
import {{elements_module}}
|
||||
import TestUtils
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
|
||||
#![cfg_attr(any(), rustfmt::skip)]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
{{#modules}}
|
||||
|
||||
mod {{.}};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// generated by {{generator}}
|
||||
// generated by {{generator}}, do not edit
|
||||
|
||||
{{#function}}
|
||||
fn {{name}}{{signature}} {
|
||||
|
||||
Reference in New Issue
Block a user