Skip to content

Commit 793c498

Browse files
committed
Log parse events.
1 parent 34c9c59 commit 793c498

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/TextDocumentState.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public CompletableFuture<Versioned<List<Diagnostics.Template>>> getDiagnosticsAs
198198
}
199199

200200
private void parse() {
201+
logger.debug("Triggering parse for {}", location);
201202
try {
202203
parser.apply(location, content)
203204
.whenComplete((ITree t, Throwable e) -> {
@@ -208,13 +209,17 @@ private void parse() {
208209

209210
// Complete future to get the tree
210211
if (t == null) {
212+
logger.error("Parse completed exceptionally: {}", location);
211213
treeAsync.completeExceptionally(e);
212214
} else {
213215
var tree = new Versioned<>(version, t, timestamp);
216+
logger.error("Parse completed: {}", location);
214217
Versioned.replaceIfNewer(last, tree);
215218
if (diagnosticsList.isEmpty()) {
219+
logger.error("Parse completed without errors: {}", location);
216220
Versioned.replaceIfNewer(lastWithoutErrors, tree);
217221
}
222+
logger.error("TreeAsync completed: {}", location);
218223
treeAsync.complete(tree);
219224
}
220225

rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/parametric/NoContributions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public String getName() {
8787

8888
@Override
8989
public CompletableFuture<ITree> parsing(ISourceLocation loc, String input) {
90+
logger.error("NoContributions::parsing()", loc);
9091
throw new NoContributionException("parsing");
9192
}
9293

0 commit comments

Comments
 (0)