Skip to content

angelozerr/editorconfig-java-parser

Repository files navigation

EditorConfig Java Parser

Provide a Java EditorConfig Parser which is able to parse .editorconfig content and throws syntax error (with location) for section, option.

This parser is useful for instance to validate the content of a IDE .editorconfig editor to mark errors inside the editor.

Usage

EditorConfigParser parser = new EditorConfigParser();
parser.parse("[*");

throws the exception (with location line, column and offset) where errors occur:

Exception in thread "main" fr.opensagres.editorconfig.SectionNotClosedException: 
Section not closed. Expected ']' at 1:3 (2)

SWT Demo

fr.opensagres.editorconfig.swt contains a little demo which consumes the parser:

EditorConfigDemo

About

A parser for .editorconfig written in Java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages