19 lines
485 B
Python
19 lines
485 B
Python
import color, mode
|
|
from lex import Grammar, PatternRule, RegionRule
|
|
from mode.sh import StringGrammar
|
|
|
|
class ConfGrammar(Grammar):
|
|
rules = [
|
|
PatternRule(r'comment', r'#.*$'),
|
|
RegionRule(r'string', r"'", Grammar, r"'"),
|
|
RegionRule(r'string', r'"', StringGrammar, r'"'),
|
|
]
|
|
|
|
class Conf(mode.Fundamental):
|
|
modename = 'conf'
|
|
extensions = ['.conf', '.cfg', '.cnf', '.config']
|
|
grammar = ConfGrammar
|
|
colors = {}
|
|
|
|
install = Conf.install
|