1
0
mirror of https://github.com/cmur2/language-zonefile.git synced 2025-06-26 12:30:24 +02:00
This commit is contained in:
cn
2017-11-11 16:15:44 +01:00
commit 136fa62e04
5 changed files with 109 additions and 0 deletions

58
grammars/zonefile.cson Normal file
View File

@ -0,0 +1,58 @@
scopeName: 'source.zonefile'
name: 'Bind Zone File'
fileTypes: [
'zone'
'db'
]
patterns: [
{
match: ';.*'
name: 'comment.line.semicolon.zonefile'
}
{
match: '@'
name: 'keyword.directive.zonefile'
}
{
match: '\\$(ORIGIN|origin|TTL|ttl|INCLUDE|include)\\s*([^;]*)(;.*)?'
name: 'keyword.directive.zonefile'
captures:
'2':
name: 'variable.other.directive.zonefile'
'3':
name: 'comment.line.semicolon.zonefile'
}
{
match: '\\d+(H|h|D|d|W|w|M|m|Y|y)'
name: 'variable.other.timeunit.zonefile'
}
{
begin: '([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)\\('
beginCaptures:
'2':
name: 'variable.other.timeunit.zonefile'
'3':
name: 'keyword.resourcetype.zonefile'
'4':
name: 'string.quoted.single.resource.address.zonefile'
end: '\\)'
name: 'string.quoted.single.address.zonefile'
patterns: [
{
match: ';.*'
name: 'comment.line.semicolon.zonefile'
}
]
}
{
match: '([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)'
name: 'string.quoted.single.address.zonefile'
captures:
'2':
name: 'variable.other.timeunit.zonefile'
'3':
name: 'keyword.resourcetype.zonefile'
'4':
name: 'string.quoted.single.resource.address.zonefile'
}
]