From ffd7b5c770955fe0be992949873702c6fe90d250 Mon Sep 17 00:00:00 2001 From: trrbl Date: Fri, 10 Apr 2020 19:57:36 +0200 Subject: [PATCH] Support csharp-script syntax. (#1425) ``` #!/usr/bin/env dotnet-script // Set Runtime #! "netcoreapp3.0" // Imports #load "myAssembly.dll" #r "nuget:CliWrap,2.5.0" ``` This syntax file basically imports the `csharp` rules and adds it's custom pre-processors. --- runtime/syntax/csx.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 runtime/syntax/csx.yaml diff --git a/runtime/syntax/csx.yaml b/runtime/syntax/csx.yaml new file mode 100644 index 00000000..a3a13a6c --- /dev/null +++ b/runtime/syntax/csx.yaml @@ -0,0 +1,8 @@ +filetype: csharp-script +detect: + filename: "\\.csx$" + header: "^#!.*/(env +)?dotnet-script( |$)" + +rules: + - include: "csharp" + - preproc: "\\B(\\#!|\\#[r|load|]+\\b)"