Skip to content

A simple script for testing/debugging your TM language files

Notifications You must be signed in to change notification settings

maelvls/grammar-debug

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TM Grammar debugger

Install

Method 1: npm

To get grammar-debug in your PATH, do

npm install -g https://github.com/maelvalais/grammar-debug

Usage: grammar-debug <grammarPath> <filePath>, where

  • <filePath> is the file on which you want to test the syntax
  • <grammarPath> is the .tmLanguage or .json tmlanguage syntax file you want to test

The script will output to stdout the parsing steps in order to help you debug the textmate grammar.

Method 2: by cloning the repo

  • git clone https://github.com/maelvalais/grammar-debug
  • go in sample/
  • edit grammar.tmLanguage with your language
  • edit file.txt with your test file
  • execute run.bat
  • look at result.txt

About

A simple script for testing/debugging your TM language files

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%