Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>lo2-highlighterNew to Visual Studio Code? Get it now.
lo2-highlighter

lo2-highlighter

alextee

|
34 installs
| (0) | Free
lo2lang 语言高亮支持
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

lo2-highlighter

Introduction

This plugin provides syntax highlighting for the lo2 language (.lo2). Lo2 is a DSL language for log analysis and oracle test. More information about lo2 can be found in the lo2 project.

Like this:

# This is the comment.
# key words:match、ref、strict、begin、end、macro、no

# This is two annotation
@name "log description demo"
@timeformat "%m-%d %H:%M:%S.%f"

test {
    test1 {
        match number_test {
			let a num = 1
			let b num = 1.
			let c num = .222
			var d num = 0.222
			letm e num = 1.333

			begin f"xx {a} {b} yy" # f-string, refer a veriable
		}

        macro test_child_oracle1 {
            begin   "test2" == 1
                    4 <= r"test\d*" <=12 # Regex expression
            end     "test4"
        }

        match test_fail {
            @mismatched "warn"
            @matched "okay"
            @ignore

            no "test0"
        }

        match test_event2 {
            @ignore
            no "test0"
        }

        match test_event1 {
            @mismatched "warn"

            letm x str = "x"
            begin   "test1"
                    1 <= ref test.test1.test_child_oracle1
                    strict 2 == ("test5" and (f"test{x}" or r"testy"))
                    2 == "test6"
            end     "test7"
        }
    }
}

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft