mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
%YAML 1.2
|
|
---
|
|
name: PowerShell
|
|
file_extensions:
|
|
- ps1
|
|
- psm1
|
|
- psd1
|
|
scope: source.powershell
|
|
contexts:
|
|
main:
|
|
- include: comments
|
|
- include: strings
|
|
- match: '\$(\w+)'
|
|
scope: variable.other.readwrite.powershell
|
|
- match: '\b(function|param|begin|process|end|if|elseif|else|switch|for|foreach|while|do|return|break|continue|trap|throw|try|catch|finally)\b'
|
|
scope: keyword.control.powershell
|
|
- match: '-[A-Za-z][A-Za-z0-9-]*'
|
|
scope: variable.parameter.powershell
|
|
|
|
comments:
|
|
- match: '#.*$'
|
|
scope: comment.line.number-sign.powershell
|
|
|
|
strings:
|
|
- match: '"'
|
|
scope: punctuation.definition.string.begin.powershell
|
|
push:
|
|
- meta_scope: string.quoted.double.powershell
|
|
- match: '"'
|
|
scope: punctuation.definition.string.end.powershell
|
|
pop: true
|
|
- match: '`.'
|
|
scope: constant.character.escape.powershell
|
|
- match: "'"
|
|
scope: punctuation.definition.string.begin.powershell
|
|
push:
|
|
- meta_scope: string.quoted.single.powershell
|
|
- match: "'"
|
|
scope: punctuation.definition.string.end.powershell
|
|
pop: true
|