Skip to content

Commit

Permalink
icb
Browse files Browse the repository at this point in the history
  • Loading branch information
Traineratwot committed Jan 4, 2024
1 parent 3169d02 commit 016203c
Showing 1 changed file with 190 additions and 0 deletions.
190 changes: 190 additions & 0 deletions syntaxes/icB.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "icX",
"foldingStartMarker": "^#\\s{0,1}Section:\\s{0,}\\w+$",
"foldingStopMarker": "^#\\s{0,1}endSection$",
"patterns": [
{
"include": "#goto"
},
{
"include": "#keywords"
},
{
"include": "#entity"
},
{
"include": "#variable"
},
{
"include": "#constant"
},
{
"include": "#comments"
},
{
"include": "#operator"
}
],
"repository": {
"GOTO": {
"patterns": [
{
"name": "support.function",
"match": "^.+(?=:\\D)"
},
{
"name": "support.function",
"match": "(?!j)(?!\\s).+"
}
]
},
"keywords": {
"patterns": [
{
"match": "\\b(ChargeRatio|Class|Damage|Efficiency|Growth|Health|Mature|MaxQuantity|OccupantHash|Occupied|Quantity|Seeding|SortingClass|Activate|AirRelease|Bpm|Charge|ClearMemory|CollectableGoods|Color|Combustion|CombustionInput|CombustionLimiter|CombustionOutput|CombustionOutput2|CompletionRatio|ElevatorLevel|ElevatorSpeed|Error|ExportCount|Filtration|Flush|ForceWrite|Fuel|Harvest|HASH(\"name\")|Horizontal|Idle|ImportCount|InterrogationProgress|LineNumber|Lock|Maximum|MineablesInQueue|MineablesInVicinity|Minimum|MinimumWattsToContact|Mode|NextWeatherEventTime|On|Open|Output|Plant|PositionX|PositionY|PositionZ|Power|PowerActual|PowerGeneration|PowerPotential|PowerRequired|PrefabHash|Pressure|PressureAir|PressureExternal|PressureInput|PressureInternal|PressureOutput|PressureOutput2|PressureSetting|PressureWaste|Ratio|RatioCarbonDioxide|RatioCarbonDioxideInput|RatioCarbonDioxideOutput|RatioCarbonDioxideOutput2|RatioLiquidCarbonDioxide|RatioLiquidNitrogen|RatioLiquidNitrousOxide|RatioLiquidOxygen|RatioLiquidPollutant|RatioLiquidVolatiles|RatioNitrogen|RatioNitrogenInput|RatioNitrogenOutput|RatioNitrogenOutput2|RatioNitrousOxide|RatioNitrousOxideInput|RatioNitrousOxideOutput|RatioNitrousOxideOutput2|RatioOxygen|RatioOxygenInput|RatioOxygenOutput|RatioOxygenOutput2|RatioPollutant|RatioPollutantInput|RatioPollutantOutput|RatioPollutantOutput2|RatioSteam|RatioVolatiles|RatioVolatilesInput|RatioVolatilesOutput|RatioVolatilesOutput2|RatioWater|RatioWaterInput|RatioWaterOutput|RatioWaterOutput2|Reagents|RecipeHash|RequestHash|RequiredPower|ReturnFuelCost|Rpm|Setting|SettingOutput|SignalID|SignalStrength|SizeX|SizeZ|SolarAngle|SolarIrradiance|SoundAlert|Stress|TargetPadIndex|TargetX|TargetY|TargetZ|Temperature|TemperatureExternal|TemperatureInput|TemperatureOutput|TemperatureOutput2|TemperatureSetting|Throttle|Time|TotalMoles|TotalMolesInput|TotalMolesOutput|TotalMolesOutput2|VelocityMagnitude|VelocityRelativeX|VelocityRelativeY|VelocityRelativeZ|Vertical|Volume|VolumeOfLiquid|WattsReachingContact|Contents|deg2rad|nan|ninf|pi|pinf|rad2deg|Recipe|Required|Channel0|Channel1|Channel2|Channel3|Channel4|Channel5|Channel6|Channel7|Average|Sum)\\b",
"name": "keyword.other.icX"
},
{
"match": "\\b(if|while|else|end|switch|case|break|foreach|each|for)\\b",
"name": "keyword.control.icX"
},
{
"match": "([~!+-=<>&|*]|dse)",
"name": "keyword.operator.icX"
},
{
"match": "(var) ([\\d\\w]+)\\s*(=)",
"captures": {
"1": {
"name": "keyword.control.icX"
},
"2": {
"name": "variable.parameter.icX",
"patterns": [
{
"include": "#variable"
}
]
},
"3": {
"name": "keyword.operator.icX"
}
}
},
{
"match": "(const) ([\\d\\w]+)\\s*(=)",
"captures": {
"1": {
"name": "keyword.control.icX"
},
"2": {
"name": "variable.parameter.icX",
"patterns": [
{
"include": "#constant"
}
]
},
"3": {
"name": "keyword.operator.icX"
}
}
},
{
"match": "(var) ([\\d\\w]+)",
"captures": {
"1": {
"name": "keyword.control.untitled"
},
"2": {
"name": "variable.parameter.icX",
"patterns": [
{
"include": "#variable"
}
]
}
}
},
{
"match": "\\b(function) ([\\d\\w]+)",
"name": "keyword.operator.icX",
"captures": {
"1": {
"name": "keyword.control.untitled"
},
"2": {
"name": "entity.name.function.icX"
}
}
}
]
},
"comments": {
"patterns": [
{
"begin": "#",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.icX"
}
},
"end": "$",
"name": "comment.line.number-sign.icX"
},
{
"begin": "use",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.icX"
}
},
"end": "$",
"name": "comment.line.number-sign.icX"
}
]
},
"constant": {
"patterns": [
{
"name": "constant.numeric.icX",
"match": "\\b[\\d\\.]+\\b"
}
]
},
"entity": {
"patterns": [
{
"name": "entity.name.function.icX",
"match": "\\b(abs|acos|add|alias|and|asin|atan|atan2|bap|bapal|bapz|bapzal|bdns|bdnsal|bdse|bdseal|beq|beqal|beqz|beqzal|bge|bgeal|bgez|bgezal|bgt|bgtal|bgtz|bgtzal|ble|bleal|blez|blezal|blt|bltal|bltz|bltzal|bna|bnaal|bnan|bnaz|bnazal|bne|bneal|bnez|bnezal|brap|brapz|brdns|brdse|breq|breqz|brge|brgez|brgt|brgtz|brle|brlez|brlt|brltz|brna|brnan|brnaz|brne|brnez|ceil|cos|debug|define|div|exp|floor|hcf|j|jal|jr|l|lb|lbn|lbns|lbs|log|lr|ls|max|min|mod|move|mul|nor|or|peek|pop|push|rand|return|round|s|sap|sapz|sb|sbn|sbs|sdns|sdse|select|seq|seqz|sge|sgez|sgt|sgtz|sin|sla|sle|sleep|slez|sll|slt|sltz|sna|snan|snanz|snaz|sne|snez|sqrt|sra|srl|ss|stack|sub|tan|trunc|xor|yield)\\b"
},
{
"name": "entity.name.function.icX",
"match": "([\\d\\w]+)\\(\\)"
},
{
"name": "entity.name.tag.icX",
"match": "(^\\s{0,}j \\w+$)|(^\\s{0,}\\w+:$)"
},
{
"name": "entity.name.function.icX",
"match": "\\b(debug|stack)\\b"
}
]
},
"variable": {
"patterns": [
{
"name": "variable.parameter.icX",
"match": "\\b(([rd]{1,}(r(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|a)))|(r(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|a))|(d(0|1|2|3|4|5|b)))\\b"
},
{
"name": "variable.language.icX",
"match": "\\bsp\\b"
}
]
}
},
"scopeName": "source.icX"
}

0 comments on commit 016203c

Please sign in to comment.