mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 17:50:15 +09:00
44 lines
2.2 KiB
YAML
44 lines
2.2 KiB
YAML
filetype: ino
|
|
|
|
detect:
|
|
filename: "\\.?ino$"
|
|
|
|
rules:
|
|
- identifier.macro: "\\b[A-Z_][0-9A-Z_]+\\b"
|
|
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
|
- constant: "\\b(HIGH|LOW|INPUT|OUTPUT)\\b"
|
|
- identifier.macro: "\\b(DEC|BIN|HEX|OCT|BYTE)\\b"
|
|
- constant: "\\b(PI|HALF_PI|TWO_PI)\\b"
|
|
- constant: "\\b(LSBFIRST|MSBFIRST)\\b"
|
|
- constant: "\\b(CHANGE|FALLING|RISING)\\b"
|
|
- constant: "\\b(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\\b"
|
|
- type: "\\b(boolean|byte|char|float|int|long|word)\\b"
|
|
- statement: "\\b(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\\b"
|
|
- special: "\\b(goto|continue|break|return)\\b"
|
|
- statement: "\\b(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\\b"
|
|
- statement: "\\b(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\\b"
|
|
- statement: "\\b(analogReference|analogRead|analogWrite)\\b"
|
|
- statement: "\\b(attachInterrupt|detachInterrupt)\\b"
|
|
- statement: "\\b(delay|delayMicroseconds|millis|micros)\\b"
|
|
- statement: "\\b(pinMode|digitalWrite|digitalRead)\\b"
|
|
- statement: "\\b(interrupts|noInterrupts)\\b"
|
|
- statement: "\\b(noTone|pulseIn|shiftIn|shiftOut|tone)\\b"
|
|
- special: "\\b(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\\b"
|
|
- statement: "\\b(setup|loop)\\b"
|
|
- preproc: "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
|
|
- constant.specialChar: "'([^']|(\\\\[\"'abfnrtv\\\\]))'|'\\\\(([0-3]?[0-7]{1,2}))'|'\\\\x[0-9A-Fa-f]{1,2}'"
|
|
- preproc: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
|
- constant.string: "<[^= ]*>|\"(\\\\.|[^\"])*\""
|
|
- constant.string:
|
|
start: "\"(\\\\.|[^\"])*\\\\[[:space:]]*$"
|
|
end: "^(\\\\.|[^\"])*\""
|
|
rules: []
|
|
|
|
- comment: "//.*"
|
|
- comment:
|
|
start: "/\\*"
|
|
end: "\\*/"
|
|
rules: []
|
|
|
|
- indent-char.whitespace: "[[:space:]]+$"
|