tolerant-php-parser/syntax-visualizer
Rob Lourens 95fa8b1150 Merge branch 'master' of github.com:Microsoft/tolerant-php-parser into lang-server-nameresolution 2017-05-05 11:34:23 -07:00
..
client Merge branch 'master' of github.com:Microsoft/tolerant-php-parser into lang-server-nameresolution 2017-05-05 11:34:23 -07:00
example rename playground->syntax-visualizer 2017-01-09 13:49:45 -08:00
server #101 Add parser path setting to syntax visualizer 2017-02-12 22:27:33 -05:00
License.txt rename playground->syntax-visualizer 2017-01-09 13:49:45 -08:00
README.md #101 Add parser path setting to syntax visualizer 2017-02-12 22:27:33 -05:00

README.md

PHP Parser Syntax Visualizer Tool

Overview

VSCode Extension that demonstrates some of the basic usage and functionality of the parser.

  • writes AST to adjacent *.ast file using JSON representation
  • Error squigglies

image

Instructions

  1. npm install client/server dependencies, run Extension
  2. open PHP file from example folder, and *.ast file to the side
  3. check out error information, and corresponding AST
  4. make some changes, and save to view updates

Settings

  • php.syntaxVisualizer.parserPath: set this path to use a different parser version than the one bundled with the syntax visualizer. For instance, after git clone https://github.com/Microsoft/tolerant-php-parser, set php.syntaxVisualizer.parserPath to the absolute directory of the tolerant-php-parser/src folder. This will enable you to easily debug the parser during development.