Skip to content

Commit

Permalink
Add in astro file support #511
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Sep 30, 2024
1 parent e18941f commit 049d033
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 4 deletions.
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ AsciiDoc (adoc)
ASP (asa,asp)
ASP.NET (asax,ascx,asmx,aspx,master,sitemap,webinfo)
Assembly (s,asm)
Astro (astro)
ATS (dats,sats,ats,hats)
Autoconf (in)
AutoHotKey (ahk)
Expand Down
6 changes: 3 additions & 3 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<th>469</th>
<th>7686</th>
<th>1536</th>
<th>256846</th>
<th>256898</th>
<th>4098</th>
</tr><tr>
<td>processor/formatters.go</td>
Expand Down Expand Up @@ -318,7 +318,7 @@
<td>0</td>
<td>4</td>
<td>0</td>
<td>22917</td>
<td>22969</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
Expand All @@ -329,7 +329,7 @@
<th>469</th>
<th>7686</th>
<th>1536</th>
<th>256846</th>
<th>256898</th>
<th>4098</th>
</tr>
<tr>
Expand Down
12 changes: 12 additions & 0 deletions examples/language/astro.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<p>Here are a few facts about me:</p>
<ul>
<li>My name is {identity.firstName}.</li>
<li>I live in {identity.country} and I work as a {identity.occupation}.</li>
{identity.hobbies.length >= 2 &&
<li>Two of my hobbies are: {identity.hobbies[0]} and {identity.hobbies[1]}</li>
}
</ul>
<p>My skills are:</p>
<ul>
{skills.map((skill) => <li>{skill}</li>)}
</ul>
42 changes: 42 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,48 @@
}
]
},
"Astro": {
"complexitychecks": [
"for ",
"for(",
"if ",
"if(",
"switch ",
"while ",
"else ",
"|| ",
"&& ",
"!= ",
"== ",
".map"
],
"extensions": [
"astro"
],
"line_comment": [
"//"
],
"multi_line": [
[
"<!--",
"-->"
],
[
"/*",
"*/"
]
],
"quotes": [
{
"end": "\"",
"start": "\""
},
{
"end": "'",
"start": "'"
}
]
},
"ATS": {
"complexitychecks": [
"if ",
Expand Down
2 changes: 1 addition & 1 deletion processor/constants.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ specificLanguages=(
'Alchemist '
'Alloy '
'Arturo '
'Astro '
'AWK '
'BASH '
'Bicep '
Expand Down

0 comments on commit 049d033

Please sign in to comment.