HXPS-ESPRIT-Post - HXPS ESPRIT Post Processor
This extension is specifically designed for developers working with .asc files for ESPRIT EDGE Post-Processors. The main goal is to
streamline your workflow by providing quick access to relevant information directly within the editor, reducing the constant need to switch
back and forth with the online help documentation.
Features
Syntax Highlighting
- Full syntax highlighting for ASC language
- Semantic tokens for control flow, functions, data keywords, and user variables
- Comments, macros, subroutines, and special operators
Code Navigation
- Go to Definition - Ctrl+Click on
$MacroName to jump to its definition
- Breadcrumb Trail - Track your navigation history through macro definitions using the Breadcrumb panel.
- Find References - Shift+F12 to find all usages of a macro or user variable
- Document Outline - View all Define/Sub/Variables/Examples in the outline panel
IntelliSense
- Auto-completion for keywords, macros (
$), variables; post commands.
- Hover Documentation - Tooltips with descriptions for:
- Formattable Codes
- Symbolic Codes & Switches
- System Variables
- CL Registers
- Built-in Functions
- Machine Modes
Code Lens
- Reference count displayed above Define/Sub blocks
- Quick access to find all references
Specialized Panels
Access via the HXPS-ESPRIT-Post icon in the Activity Bar:
- Breadcrumb Trail - Navigation history through macro jumps
- CL Register Search - Search CL registers by number or name
- Post Register Search - Search Formattable/Symbolic codes
- Post Functions - Browse and search ESPRIT functions
- Examples List - View all categorized examples available in ESPRIT EDGE
- Custom Settings - View all customs settings usage in the current post
Interactive visual editor for complex formattable codes (Ctrl+Alt+F):
- Parse existing formattable code lines
- Visual form for INCH/METRIC packets
- Configure sign modes, zero handling, decimal places
- Live preview of formatted output
ESPRIT EDGE Compiler Integration
- Compile Post (Ctrl+Shift+B) - Compile the current post-processor
- Compile Post (Copy) - Compile to a new copy
NC Code Generation
Generate NC code from a running ESPRIT EDGE session without leaving VS Code — no more back-and-forth between the two applications.
- Generate NC Code (Ctrl+Alt+G) — Connects to the active ESPRIT EDGE session via COM and triggers NC generation using the project's existing post-processor configuration. If multiple ESPRIT EDGE sessions are open, a picker lets you select the target project. The ESPRIT EDGE window stays in the background.
Requirement: ESPRIT EDGE must be running with a project open.
Beta Features
These features are experimental and disabled by default. Enable them by setting hxpsEspritPost.enableBetaFeatures: true in your VS Code settings, then reload the window.
Open Extended Post
Displays a fully resolved view of the active ASC post-processor — equivalent to what GP.exe actually compiles. For each Ex_ event, all Define/Sub calls are recursively inlined, \\ continuation lines are merged, and each output line is numbered with the same counter GP.exe uses. This makes it easy to understand the exact code path executed at runtime and to verify which logical line number a given source line maps to.
Command: HXPS-ESPRIT-Post: Open Extended Post
Link Trace File to ASC
Connects an ESPRIT EDGE trace file (generated during NC post-processing) to its source ASC post-processor, enabling direct navigation from trace output back to the original source code.
Workflow:
- Open the ASC post-processor file
- Run
HXPS-ESPRIT-Post: Link Trace File to Active ASC (via Command Palette or the HXPS-ESPRIT-Post tools menu)
- Select the trace file — it opens automatically beside the ASC editor
Once linked:
- Hover over any numbered trace line → tooltip shows the corresponding ASC source line and its content; click the link in the tooltip to open that line in the ASC editor
- Ctrl+Click on a declared variable token (displayed in green) → jumps within the trace file to the line where that variable was last assigned a value before the cursor
- Status bar indicator (
🔗 tracename ↔ ascname) confirms the active link; click it to re-index after modifying the post-processor
The mapping is GP.exe-accurate: logical line numbers account for all Define/Sub expansions, including inline $MacroName calls whose body lines are correctly traced back to their physical ASC location.
Associative Custom Settings Import/Export
Preserve the custom settings associated with your post.
- Import Custom Settings – Select your MPRJ file to import all custom settings at the end of the ASC file.
- Export Custom Settings – Export the custom settings available in your ASC file into a DUMMY MPRJ file, ready to be imported into your correct MPRJ.
Snippets
Quick code templates for common structures:
- Define/EndDefine blocks
- Sub/EndSub blocks
- If/ElseIf/Else/EndIf
- While/EndWhile
Keyboard Shortcuts
| Shortcut |
Command |
| Ctrl+Alt+G |
Generate NC Code (ESPRIT EDGE) |
| Ctrl+Alt+F |
Open Formattable Codes Editor |
| Ctrl+Shift+B |
Compile ESPRIT EDGE Post |
| F12 |
Go to Definition |
| Shift+F12 |
Find All References |
Requirements
- For compilation: ESPRIT EDGE Accessories Pack with Ultra Post Compiler
Installation
From VSIX file
- Download the
.vsix file
- In VS Code, open Command Palette (Ctrl+Shift+P)
- Run "Extensions: Install from VSIX..."
- Select the downloaded file
Extension Settings
| Setting |
Type |
Default |
Description |
hxpsEspritPost.enableBetaFeatures |
boolean |
false |
Enable experimental features (Open Extended Post, Link Trace File to ASC). Requires reloading VS Code after toggling. |
hxpsEspritPost.enableDiagnostics |
boolean |
true |
Enable or disable real-time grammar diagnostics for .asc files. When disabled, all errors and warnings are immediately cleared. |
hxpsEspritPost.knownExternalMacros |
string[] |
["P_UIFR"] |
Macro names (without $) defined outside the current file. These are excluded from "undefined macro" diagnostics. |
This extension contributes the following commands:
hxps-esprit-post.generateNC - Generate NC Code (ESPRIT EDGE)
hxps-esprit-post.compilePost - Compile ESPRIT EDGE Post
hxps-esprit-post.compilePostCopy - Compile ESPRIT EDGE Post (Create Copy)
hxps-esprit-post.openFormatableEditor - Open Formattable Codes Editor
hxps-esprit-post.goToDefinitionBreadcrumb - Go to Definition with breadcrumb tracking
hxps-esprit-post.searchCLRegister - Search CL Registers
hxps-esprit-post.searchPostRegister - Search Post Registers
hxps-esprit-post.searchPostFunctions - Search Post Functions
hxps-esprit-post.openExtendedPost - Open Extended Post (beta)
hxps-esprit-post.linkTraceToAsc - Link Trace File to Active ASC (beta)
hxps-esprit-post.remapTraceAssociation - Re-map Trace Association (beta)
Release Notes
See CHANGELOG.md for detailed release notes.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This extension is an experimental project developed with a unique approach. Before installing, please keep the following in mind:
- AI-Generated: This extension was built entirely using Claude AI and Gemini. The code was assembled and tested through iterative prompts and AI assistance.
- Stability & Optimization: Because of this development process, the extension may contain bugs, might not be fully optimized, or may
not strictly follow all VS Code "best practices.“
- Automated Scraping: The documentation and data used in this extension were extracted via an automated process from the software's
help files (*.chm).
- Accuracy Warning: Because of this automated extraction, some data might be outdated, incomplete, or incorrectly formatted. Please
cross-reference with the official ESPRIT EDGE documentation for critical tasks.
Enjoy coding your post-processors!