Skip to content

Commit

Permalink
Normalizes paths, version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
joaobispo committed Feb 10, 2025
1 parent 57f4ef4 commit d9f94a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@specs-feup/clava-visualization",
"version": "1.0.3",
"version": "1.0.4",
"author": "Bruno Oliveira",
"description": "Clava implementation of the LARA package for visualization of the mapping between source code and AST",
"type": "module",
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@specs-feup/clava": "^3.0.5",
"@specs-feup/lara-visualization": "^1.0.4"
"@specs-feup/lara-visualization": "1.0.6"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand Down
9 changes: 5 additions & 4 deletions src/ClavaAstConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
escapeHtml,
getNodeCodeTags,
getSyntaxHighlightTags,
normalizeFilepath,
} from "@specs-feup/lara-visualization/api/AstConverterUtils.js";

/**
Expand Down Expand Up @@ -113,7 +114,7 @@ export default class ClavaAstConverter implements GenericAstConverter {
Object.assign(info, {
"File name": jp.name,
"Source folder": jp.sourceFoldername,
"Relative path": jp.relativeFilepath,
"Relative path": normalizeFilepath(jp.relativeFilepath),
"Is C++": jp.isCxx,
"Is header file": jp.isHeader,
"Has main": jp.hasMain,
Expand Down Expand Up @@ -230,7 +231,7 @@ export default class ClavaAstConverter implements GenericAstConverter {
(nextId++).toString(),
jp.joinPointType,
this.getCode(jp),
jp.filepath,
normalizeFilepath(jp.filepath),
this.getJoinPointInfo(jp),
jp.children.map((child) => toToolJoinPoint(child))
);
Expand Down Expand Up @@ -586,7 +587,7 @@ export default class ClavaAstConverter implements GenericAstConverter {
rootCodeNode.children.map((child) => {
const file = child.children[0];
const fileJp = file.jp as FileJp;
const filepath = fileJp.filepath;
const filepath = normalizeFilepath(fileJp.filepath);

const fileCode = child.code!; // same as file.code!
const fileHtmlCode = escapeHtml(fileCode);
Expand All @@ -600,7 +601,7 @@ export default class ClavaAstConverter implements GenericAstConverter {
})
); // Associate code with each file
} else {
const filepath = (root as Joinpoint).filepath;
const filepath = normalizeFilepath((root as Joinpoint).filepath);
const code = rootCodeNode.code;
const htmlCode = code ? escapeHtml(code) : "";
const linkedHtmlCode = this.linkCodeToAstNodes(
Expand Down

0 comments on commit d9f94a4

Please sign in to comment.