Skip to content

Commit 1c1888b

Browse files
committed
Merge branch 'topic/lkql_jit/tab_in_sources' into 'master'
Add doc about the reason of "tabStop = 1" in LKQL analysis context creation See merge request eng/libadalang/langkit-query-language!440
2 parents e2b7106 + 7a5ad1f commit 1c1888b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lkql_jit/language/src/main/java/com/adacore/lkql_jit/LKQLLanguage.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public final class LKQLLanguage extends TruffleLanguage<LKQLContext> {
103103
/** A simple constructor for the library loading. */
104104
public LKQLLanguage() {
105105
super();
106+
// We create an LKQL analysis context with a tab-stop size of 1 since Truffle.Source
107+
// columns counting is based on characters:
108+
// https://www.graalvm.org/truffle/javadoc/com/oracle/truffle/api/source/Source.html#createSection(int,int,int,int)
106109
this.lkqlAnalysisContext = Liblkqllang.AnalysisContext.create(
107110
null,
108111
null,
@@ -111,6 +114,7 @@ public LKQLLanguage() {
111114
true,
112115
1
113116
);
117+
114118
// Set the color support flag
115119
SUPPORT_COLOR = System.getenv("TERM") != null && System.console() != null;
116120
}

0 commit comments

Comments
 (0)