All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dingyi222666.monarch.languages.LanguageShell.kt Maven / Gradle / Ivy

The newest version!
package io.github.dingyi222666.monarch.languages

import io.github.dingyi222666.monarch.common.*
 import io.github.dingyi222666.monarch.loader.dsl.*
import io.github.dingyi222666.monarch.types.IMonarchLanguage

public val ShellLanguage: IMonarchLanguage by lazy {
  buildMonarchLanguage {
    tokenPostfix = ".shell"
    ignoreCase = true
    defaultToken = ""
    brackets {
      bracket("{","}","delimiter.bracket")
      bracket("(",")","delimiter.parenthesis")
      bracket("[","]","delimiter.square")
    }
    keywords("if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi", "fin",
        "fil", "done", "exit", "set", "unset", "export", "function")
    "builtins" and listOf("ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod",
        "chroot", "clear", "cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git",
        "grep", "hg", "kill", "killall", "ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "node",
        "npm", "ping", "ps", "restart", "rm", "rmdir", "sed", "service", "sh", "shopt", "shred",
        "source", "sort", "sleep", "ssh", "start", "stop", "su", "sudo", "svn", "tee", "telnet",
        "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write", "yes", "zsh")
    "startingWithDash" and "\\-+\\w+"
    "identifiersWithDashes" and "[a-zA-Z]\\w+(?:@startingWithDash)+"
    symbols("[=>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy