Skip to content

Commit 3c08fae

Browse files
committed
minor: Remove all mentions of "AST" because Langkit is producing a parse tree
1 parent 5f3de1c commit 3c08fae

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

langkit/templates/java_api/jni_impl_c.mako

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,7 +2530,7 @@ ${iterator.jni_c_impl(iterator_type)}
25302530
% endfor
25312531

25322532
// ==========
2533-
// AST node functions
2533+
// Node functions
25342534
// ==========
25352535

25362536
// Return whether the two given entities are equal
@@ -2720,7 +2720,7 @@ ${api.jni_func_sig("node_image", "jobject")}(
27202720
}
27212721

27222722
// ==========
2723-
// AST node field accessors
2723+
// Node field accessors
27242724
// ==========
27252725

27262726
% for astnode in ctx.astnode_types:

langkit/templates/java_api/main_class.mako

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public final class ${ctx.lib_name.camel} {
367367
// ==========
368368

369369
/**
370-
* Interface to visit the AST.
370+
* Interface to visit the parse tree.
371371
*/
372372
public static interface BasicVisitor<T> {
373373
T visit(${root_node_type} node);
@@ -379,7 +379,7 @@ public final class ${ctx.lib_name.camel} {
379379
}
380380

381381
/**
382-
* Interface to visit the AST with a parameter.
382+
* Interface to visit the parse tree with a parameter.
383383
*/
384384
public static interface ParamVisitor<T, P> {
385385
T visit(${root_node_type} node, P param);
@@ -4094,28 +4094,28 @@ public final class ${ctx.lib_name.camel} {
40944094
// ----- Dumping methods -----
40954095

40964096
/**
4097-
* Return the AST in a string.
4097+
* Return the parsing tree in a string.
40984098
*
4099-
* @return The string containing the representation of the AST
4099+
* @return The string containing the representation of the parsing tree
41004100
* from the node.
41014101
*/
41024102
@CompilerDirectives.TruffleBoundary
4103-
public String dumpAST() {
4103+
public String dumpTree() {
41044104
final StringBuilder builder = new StringBuilder();
4105-
this.dumpAST(builder);
4105+
this.dumpTree(builder);
41064106
return builder.toString();
41074107
}
41084108

41094109
/**
4110-
* Dump the AST in the given string builder.
4110+
* Dump the parse tree in the given string builder.
41114111
*
4112-
* @param builder The builder to dump the AST in.
4112+
* @param builder The builder to dump the parse tree in.
41134113
*/
41144114
@CompilerDirectives.TruffleBoundary
4115-
public void dumpAST(
4115+
public void dumpTree(
41164116
final StringBuilder builder
41174117
) {
4118-
this.dumpAST(builder, "");
4118+
this.dumpTree(builder, "");
41194119
}
41204120

41214121
/**
@@ -4135,17 +4135,18 @@ public final class ${ctx.lib_name.camel} {
41354135
builder.append(indent)
41364136
.append(name)
41374137
.append(":\n");
4138-
value.dumpAST(builder, indent + " ");
4138+
value.dumpTree(builder, indent + " ");
41394139
}
41404140

41414141
/**
4142-
* Dump the AST in the given string builder with the indent level.
4142+
* Dump the parse tree in the given string builder with the indent
4143+
* level.
41434144
*
4144-
* @param builder The builder to dump the AST in.
4145+
* @param builder The builder to dump the tree in.
41454146
* @param indent The starting indent level.
41464147
*/
41474148
@CompilerDirectives.TruffleBoundary
4148-
protected void dumpAST(
4149+
protected void dumpTree(
41494150
final StringBuilder builder,
41504151
String indent
41514152
) {
@@ -4269,7 +4270,7 @@ public final class ${ctx.lib_name.camel} {
42694270

42704271
}
42714272

4272-
// ===== Generated AST node wrapping classes =====
4273+
// ===== Generated node wrapping classes =====
42734274

42744275
% for astnode in ctx.astnode_types:
42754276
% if astnode != T.root_node:

langkit/templates/java_api/readme_md.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class Main {
4141
${ctx.lib_name.camel}.AnalysisContext.create();
4242
${ctx.lib_name.camel}.AnalysisUnit unit = ctx.getUnitFromFile(myFile);
4343

44-
// Dump the AST
44+
// Dump the parsed tree
4545
System.out.println(unit.root().dump());
4646

4747
}

testsuite/tests/java_api/general/common/BindingsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private static void testNodes() {
219219
"Unit root children = " + root.children().toString()
220220
);
221221
System.out.println(
222-
"Unit root AST dump = " + root.dumpAST()
222+
"Unit root tree dump = " + root.dumpTree()
223223
);
224224
System.out.println(
225225
"Unit root is a list node = " + root.isListType()

testsuite/tests/java_api/general/graal_c_api/test.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Unit root = <Sequence foo.txt:1:1-1:50>
5151
Unit root kind = Sequence
5252
Unit root children count = 5
5353
Unit root children = [<NullNode foo.txt:1:1-1:5>, <Example foo.txt:1:6-1:13>, <Var foo.txt:1:14-1:37>, <Example foo.txt:1:38-1:45>, <NullNode foo.txt:1:46-1:50>]
54-
Unit root AST dump = Sequence foo.txt:1:1-1:50>
54+
Unit root tree dump = Sequence foo.txt:1:1-1:50>
5555
|item_0:
5656
| NullNode foo.txt:1:1-1:5>
5757
|item_1:

testsuite/tests/java_api/general/jni/test.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Unit root = <Sequence foo.txt:1:1-1:50>
5151
Unit root kind = Sequence
5252
Unit root children count = 5
5353
Unit root children = [<NullNode foo.txt:1:1-1:5>, <Example foo.txt:1:6-1:13>, <Var foo.txt:1:14-1:37>, <Example foo.txt:1:38-1:45>, <NullNode foo.txt:1:46-1:50>]
54-
Unit root AST dump = Sequence foo.txt:1:1-1:50>
54+
Unit root tree dump = Sequence foo.txt:1:1-1:50>
5555
|item_0:
5656
| NullNode foo.txt:1:1-1:5>
5757
|item_1:

0 commit comments

Comments
 (0)