ejrgilbert / whamm

5 stars 2 forks source link

create syntax highlighting file for language #25

Open ejrgilbert opened 1 month ago

ejrgilbert commented 1 month ago

Also add highlighting to the book (see docs/book.toml)

ahuoguo commented 3 weeks ago

Github Markdown seems to support DTrace syntax highlighting. Defined here in this repo or the vscode extension.

For example

syscall::read:entry
/execname == "passwd"/
{
   got = *(char *)copyin(arg1, 1);
}

syscall::read:return
/execname == "passwd" && arg0 == 1/
{
   printf("%c", got);
}

A more sophisticated syntax highlighting for a high-level tracing language is bpftrace.