Skip to content

Fix cross reference table heading #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## v1.1.1 Add Cross Reference Table heading

- Adds styling for Cross Reference Table heading

## v1.1.0 Additional keywords and path formats

- Adds syntax highlighting for additional linker script macros and other compiler generated tags.
1,646 changes: 1,100 additions & 546 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "gnu-mapfiles",
"displayName": "GNU Linker Map files",
"description": "Syntax highlighting and symbol listing for GNU linker .map files",
"version": "1.1.0",
"version": "1.1.1",
"engines": {
"vscode": "^1.30.0"
},
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ class SymbolParser implements vscode.DocumentSymbolProvider {

const section = sections[sections.length - 1];

const heading = line.match(/^(Discarded input sections|Archive member included to satisfy reference by file \(symbol\)|Memory Configuration|Linker script and memory map|Allocating common symbols)$/);
const heading = line.match(/^(Discarded input sections|Archive member included to satisfy reference by file \(symbol\)|Memory Configuration|Linker script and memory map|Allocating common symbols|Cross Reference Table)$/);
if (heading) {
// End the previous section on the previous line:
if (section) {
@@ -80,7 +80,7 @@ class SymbolParser implements vscode.DocumentSymbolProvider {
}

if (!section.entries.length) {
const tableHeaders = line.match(/^(Name\s+Origin\s+Length\s+Attributes|Common\s+symbol\s+size\s+file)$/);
const tableHeaders = line.match(/^(Name\s+Origin\s+Length\s+Attributes|Common\s+symbol\s+size\s+file|Symbol\s+File)$/);
if (tableHeaders) {
return; // Ignore header
}
@@ -100,7 +100,7 @@ class SymbolParser implements vscode.DocumentSymbolProvider {
const entry = new vscode.DocumentSymbol(symbol[1], '', vscode.SymbolKind.Field, range, range);
if (symbol[2]) {
entry.detail = formatAddr(symbol[2]);
} else {
} else if (section.name !== "Cross Reference Table") {
continuesOnNextLine = entry;
}