From 97632e5573e2ebbf0f1a87c17cff76bb8af28b53 Mon Sep 17 00:00:00 2001 From: TANIGUCHI Masaya Date: Wed, 8 Feb 2017 14:36:39 +0900 Subject: [PATCH] add keywords --- cmd/micro/runtime.go | 2 +- runtime/syntax/c.micro | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/micro/runtime.go b/cmd/micro/runtime.go index d84cd853..f2606a5a 100644 --- a/cmd/micro/runtime.go +++ b/cmd/micro/runtime.go @@ -791,7 +791,7 @@ func runtimeSyntaxAwkMicro() (*asset, error) { return a, nil } -var _runtimeSyntaxCMicro = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x54\x5b\x8f\xdb\x36\x13\x7d\xf7\xaf\x60\xe8\xfd\x3e\x4b\xde\xb5\xbd\x49\x8a\xb4\x49\x9b\x1a\x85\xd1\x36\x6f\x2d\xda\xa0\x40\x2a\x7a\x0d\x8a\x1a\x49\x83\xa5\x49\x81\x1c\xf9\xd2\x4c\xfe\x7b\x41\x5b\x9b\x3a\x1b\xec\x8b\x41\xcf\xe5\x9c\x33\x17\xcd\x78\x2c\xde\x41\x00\x81\x51\x68\x27\xe0\xa0\xb7\x9d\x05\x51\xfb\x20\x56\x8b\xd5\xf5\xf5\x7c\x34\x1e\x8f\xe2\xd1\x91\x3e\x08\x69\xa4\x90\x6a\x9e\x99\xcc\x70\xd7\xf1\xe1\x90\x2f\x79\x95\x5f\x9d\x8d\x6d\xd6\x7e\x36\xbe\x1b\x8c\x88\xcb\xc1\x5b\x41\x9d\x5f\xc9\x91\xf1\xd6\x07\x81\x15\x38\xc2\x1a\x21\x08\xa9\xca\xe2\xa7\xd9\xdf\x9b\x75\x71\x3b\x7b\x7d\x7a\x5c\xab\x52\x8a\x21\x90\x8e\x1d\xa4\x90\xac\xb6\x5e\x13\x57\xbe\x2f\x2d\x70\xe9\xbd\x65\xd3\xea\xc0\xe8\x88\x63\xeb\x03\xb1\xf5\xae\xe1\x88\xff\x80\xaf\x19\x5c\xbf\xe5\x9d\xc7\x8a\x23\x69\x42\xc3\xc6\xbb\x48\x1c\x29\xf4\x86\xb8\x77\xe8\x1d\x27\xe4\x0a\x6a\x86\x03\x41\x70\x9c\xf5\x2e\x5f\x46\x6c\x1c\x54\x8c\xce\xa2\x83\x5c\x95\xf2\xb1\x8a\x2c\x2e\x13\x45\xce\x59\xd6\x6f\x96\xf9\x12\x1d\x65\xdf\xf1\xf3\x57\xfc\xf2\x05\xbf\xfa\x86\x3b\x0a\x79\x9e\x6f\xe8\xbf\xcc\xc4\x0f\x5b\x70\x74\x4a\x37\x56\xc7\xc8\x4e\x6f\x21\x76\xda\x00\x13\x6c\x3b\xab\x09\xb8\xeb\x4b\x8b\x86\xbb\xe0\x09\x0c\x41\xc5\x5d\xc0\x5d\x72\x24\xe6\x14\xcf\xd4\x62\xe4\x3a\x20\xb8\x8a\x77\x18\xa8\xd7\x96\xfb\x88\xae\xe1\x6d\x4f\x3a\x35\x65\xe7\xad\x26\xb4\xc0\x01\x1a\x8c\x04\x81\xe1\xd0\x59\x34\x48\xf9\x53\x7a\x6a\x1f\x18\x6b\xde\xb7\x29\xad\xf2\x0c\x36\x02\x1b\x1d\x81\x2b\xa8\x75\x6f\x89\xe3\x1e\xc9\xb4\x4f\x02\x50\x38\x32\xb5\xc1\xef\xd9\x68\x32\x2d\xfb\x0e\x82\x26\x1f\xd8\xc1\x9e\x2b\xb0\x40\xf0\x64\x6e\xe3\xc9\xa7\xc1\x10\xba\x1e\xb8\x0c\xa0\xef\x39\x00\xf5\xc1\x5d\xa4\x74\x01\xba\xe0\x8d\x90\x77\x45\xf1\xe6\xd4\xb4\x37\xeb\xf5\x74\x7c\xf9\x27\x6d\x16\x3a\x60\x74\xc6\xf6\x15\xa4\x49\x32\xd6\x6e\x99\x9f\xa6\xeb\x2a\xac\x19\x6c\x86\x35\x47\xc8\x4f\xd5\xea\xe0\x52\xdf\x20\x04\x1f\xf2\x07\xa2\xd3\x86\xe8\x24\x6d\x92\x15\x77\x13\xa5\xd6\x9c\x29\x55\xc8\x89\x2e\x6b\x17\x68\xa7\xd4\x3a\xcf\x27\x52\xc8\x89\x52\x59\x56\xdc\xce\x5e\xae\x97\xc5\xed\xec\xdb\xf5\xc7\xe7\x37\x2f\x3e\x7d\x76\x1d\xce\x5b\xfc\x8b\x9e\xd5\x67\xcf\x44\x8e\xd2\xf7\x33\x1e\x8b\x5f\x57\x2b\x51\xf6\x68\x09\x5d\xfc\xba\x21\x9b\x8d\x26\x0a\x58\xf6\x04\x9b\xcd\x65\x79\x2a\x53\x59\x71\x97\xaf\xa7\x2a\x57\xb9\x4c\x81\x99\xb6\xe7\x3d\xd5\x71\xcb\x03\x22\xb7\x58\x55\xe0\x86\xd5\xe5\x4e\x9b\x7b\xa8\x38\x40\xa4\x80\x86\x38\x82\xa1\x87\xa5\xf7\x35\xef\x41\xdf\xe7\x9b\x4d\x92\xf6\xdb\x30\x31\xb1\x4a\x8a\xbe\xd6\x55\xcc\xdf\x7c\x7f\x73\x3d\xe5\xb7\xcf\xd4\xff\xd6\x52\xc8\x1f\xa4\x90\x3f\x4a\x21\x17\x52\xc8\x99\x14\xf2\xff\x52\x8c\x46\xe3\xdf\x75\x00\x47\x2d\x10\x1a\x6d\x07\xa8\xb1\x38\x83\x6d\x75\x03\x8e\xb4\x90\x45\x96\x7f\xfc\x94\x30\x54\x91\x7e\xd6\x72\xf4\xa8\xf7\x73\xd7\x6f\xcb\xe1\x24\xdc\xce\x5e\x9f\x0f\x81\x54\xe5\xed\x65\x57\x93\xf1\xa1\xa5\x7f\x52\x40\xd7\x88\x16\x9b\xd6\x62\xd3\x12\xba\x66\x2e\xc4\x07\xdf\x8b\x3d\x5a\x2b\xd0\x89\x06\x1c\x04\x6d\xc5\x3e\x8d\xf6\xe8\xfb\x20\xca\x90\x22\x4b\xab\xcd\x7d\xba\x77\x55\xc2\x89\x27\x9c\x28\xc8\x0b\xe3\xb7\x20\xac\x8e\x74\x23\x4a\x30\xba\x8f\x20\x86\xdb\x77\xc9\x22\x42\x6f\x21\x9e\x59\x4a\x48\x10\xba\xeb\x2c\x42\x95\x38\xa9\x05\xe1\x43\x05\x21\xbd\x8e\x42\x07\x10\x01\x74\x72\xcd\x1f\x17\x7c\x26\x16\x52\x66\x4a\xcd\xb9\xb8\x93\xeb\x7c\x2a\xe5\x50\xdd\xfb\x16\xe3\x20\x2d\xdd\xe6\xbf\x7e\xfe\xe3\x83\x08\x10\x7d\x1f\x0c\x08\x74\x04\x2e\xe2\x0e\x9e\x8d\xc6\x03\xe8\x51\xbb\x34\xb9\x40\x6f\xbf\xc0\x53\xea\x72\x9d\xae\xa4\x00\x57\xbd\x95\x77\x5f\x32\x26\xbe\x95\xdf\x9e\x66\x7e\x59\xe8\x67\xc1\x67\x97\x5c\x2c\xe6\x53\xf9\xc8\x38\x70\x2e\xd4\x74\xc0\x56\xd3\xc5\x19\xf1\x7d\xd0\x68\x93\xfc\x7d\x8b\x74\xbe\x79\x0f\x6a\x6f\x9a\x00\xe0\x84\xbc\xd0\x76\x7d\x25\x47\xff\x06\x00\x00\xff\xff\xa4\x4a\x51\xa0\x8c\x06\x00\x00") +var _runtimeSyntaxCMicro = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x74\x54\xdd\x6e\x1b\x37\x13\xbd\xd7\x53\x30\x94\xbf\xcf\xbb\xb2\x25\x3b\x49\x91\x36\x69\x53\xa1\x10\xda\xe6\xae\x45\x1b\x14\x48\x45\x59\xe0\x72\x67\xb5\x03\x53\xe4\x62\x38\x6b\xc9\xcd\xe4\xdd\x0b\x4a\xeb\x54\x71\xe0\x1b\x63\x3d\x3f\xe7\x1c\xce\x1c\xcd\x78\xac\xde\x01\x81\xc2\xa4\x6c\x50\xb0\xb7\xdb\xce\x83\x6a\x22\xa9\xc5\xd5\xe2\xe2\x62\x36\x1a\x8f\x47\xe9\x3e\xb0\xdd\x2b\xed\xb4\xd2\x66\x56\xb8\xc2\x49\xd7\xc9\x7e\x5f\xce\x65\x51\x9e\x1d\x83\x6d\xd1\x7e\x0e\xbe\x1b\x82\x88\xf3\x21\x5b\x43\x53\x9e\xe9\x91\x8b\x3e\x92\xc2\x1a\x02\x63\x83\x40\x4a\x9b\x6a\xf9\xd3\xf4\xef\xf5\x6a\x79\x3d\x7d\x7d\xf8\xb8\x30\x95\x56\x43\x21\xdf\x77\x90\x4b\x0a\xdb\x73\x94\xc6\x47\xcb\x52\xc7\xbe\xf2\x20\x55\x8c\x5e\x5c\x6b\x49\x30\xb0\xa4\x36\x12\x8b\x8f\x61\x23\x09\xff\x81\xd8\x08\x84\x7e\x2b\x77\x11\x6b\x49\x6c\x19\x9d\xb8\x18\x12\x4b\x62\xea\x1d\x4b\x1f\x30\x06\xc9\xf0\x35\x34\x02\x7b\x06\x0a\x52\xf4\xa1\x9c\x27\xdc\x04\xa8\x05\x83\xc7\x00\xa5\xa9\xf4\x63\x29\x45\x9a\x67\x8a\x52\x8a\xa2\x5f\xcf\xcb\x39\x06\x2e\xbe\x93\xe7\xaf\xe4\xe5\x0b\x79\xf5\x8d\x74\x4c\x65\x59\xae\xf9\xbf\xce\xcc\x0f\x5b\x08\x7c\x68\x77\xde\xa6\x24\xc1\x6e\x21\x75\xd6\x81\x30\x6c\x3b\x6f\x19\xa4\xeb\x2b\x8f\x4e\x3a\x8a\x0c\x8e\xa1\x96\x8e\xf0\x2e\x27\x32\x73\xae\x17\x6e\x31\x49\x43\x08\xa1\x96\x3b\x24\xee\xad\x97\x3e\x61\xd8\xc8\xb6\x67\x9b\x87\x72\x17\xbd\x65\xf4\x20\x04\x1b\x4c\x0c\x24\xb0\xef\x3c\x3a\xe4\xf2\x29\x3d\x4d\x24\xc1\x46\x76\x6d\x6e\xab\xa3\x80\x4f\x20\xce\x26\x90\x1a\x1a\xdb\x7b\x96\xb4\x43\x76\xed\x93\x00\x4c\xf7\xc2\x2d\xc5\x9d\x38\xcb\xae\x95\xd8\x01\x59\x8e\x24\x01\x76\x52\x83\x07\x86\x27\x7b\x37\x91\x63\x5e\x0c\x63\xe8\x41\x2a\x02\x7b\x2b\x04\xdc\x53\x38\x69\xe9\x08\x3a\x8a\x4e\xe9\x9b\xe5\xf2\xcd\x61\x68\x6f\x56\xab\xc9\xf8\xf4\x9f\x6c\x2f\x0c\x20\x18\x9c\xef\x6b\xc8\x9b\x14\x6c\xc2\xbc\x3c\x6c\x37\xd4\xd8\x08\xf8\x02\x1b\x49\x50\x1e\x5e\x6b\x29\xe4\xb9\x01\x51\xa4\xf2\x81\xe8\xe0\x10\x9b\xa5\x9d\x17\xcb\x9b\x73\x63\x56\x52\x18\xb3\xd4\xe7\xb6\x6a\x02\xf1\x9d\x31\xab\xb2\x3c\xd7\x4a\x9f\x1b\x53\x14\xcb\xeb\xe9\xcb\xd5\x7c\x79\x3d\xfd\x76\xf5\xf1\xf9\xe5\x8b\x4f\x9f\x53\xfb\xa3\x95\x7f\xb1\xd3\xe6\x98\x39\xd7\xa3\xfc\x23\x1a\x8f\xd5\xaf\x8b\x85\xaa\x7a\xf4\x8c\x21\x7d\x3d\x90\xf5\xda\x32\x13\x56\x3d\xc3\x7a\x7d\xfa\x3c\x53\x98\x62\x79\x53\xae\x26\xa6\x34\xa5\xce\x85\x85\xf5\x47\x9f\xda\xb4\x95\x01\x51\x5a\xac\x6b\x08\x83\x75\xa5\xb3\xee\x16\x6a\x21\x48\x4c\xe8\x58\x12\x38\x7e\x30\x7d\x6c\x64\x07\xf6\xb6\x5c\xaf\xb3\xb4\xdf\x86\x8d\xa9\x45\x56\xf4\xb5\xae\xe5\xec\xcd\xf7\x97\x17\x13\x79\xfb\xcc\xfc\x6f\xa5\x95\xfe\x41\x2b\xfd\xa3\x56\xfa\x4a\x2b\x3d\xd5\x4a\xff\x5f\xab\xd1\x68\xfc\xbb\x25\x08\xdc\x02\xa3\xb3\x7e\x80\x1a\xab\x23\xd8\xd6\x6e\x20\xb0\x55\x7a\x59\x94\x1f\x3f\x65\x0c\xb3\xcc\x7f\x56\x7a\xf4\x68\xf6\xb3\xd0\x6f\xab\xe1\x2e\x5c\x4f\x5f\x1f\xaf\x81\x36\xd5\xf5\xe9\x54\x1f\x82\x05\x53\x0f\xd2\x58\x9f\x8e\x16\x1b\xa6\xfc\x27\x13\x86\x8d\x6a\x71\xd3\x7a\xdc\xb4\x8c\x61\x33\x53\xea\x43\xec\xd5\x0e\xbd\x57\x18\xd4\x06\x02\x90\xf5\x6a\x97\xb7\x7d\x1f\x7b\x52\x15\xe5\xca\xca\x5b\x77\x9b\xef\x60\x9d\x71\xd2\x01\x27\x29\x8e\xca\xc5\x2d\x28\x6f\x13\x5f\xaa\x0a\x9c\xed\x13\xa8\xe1\x26\x9e\xb2\x28\xea\x3d\xa4\x23\x4b\x05\x19\xc2\x76\x9d\x47\xa8\x33\x27\xb7\xa0\x22\xd5\x40\xf9\xeb\x5e\x59\x02\x45\x60\x73\x6a\xf6\x78\x06\x47\x62\xa5\x75\x61\xcc\x4c\x96\x37\x7a\x55\x4e\xb4\x1e\x5e\xf7\xbe\xc5\x34\x48\xcb\x37\xfb\xaf\x9f\xff\xf8\xa0\x08\x52\xec\xc9\x81\xc2\xc0\x10\x12\xde\xc1\xb3\xd1\x78\x00\xbd\xb7\x21\x2f\x93\xf8\xed\x17\x78\xc6\x9c\x3a\xec\x4c\x2b\x08\xf5\x5b\x7d\xf3\x25\x63\xe6\x5b\xc4\xed\xc1\x06\xa7\x0f\xfd\x2c\xf8\x98\xd2\x57\x57\xb3\x89\x7e\x14\x1c\x38\xaf\xcc\x64\xc0\x36\x93\xab\x23\xe2\x7b\xb2\xe8\xb3\xfc\x5d\x8b\x7c\x3c\x83\x0f\x6a\x2f\x37\x04\x10\x94\x3e\xd1\x76\x71\xa6\x47\xff\x06\x00\x00\xff\xff\xc8\x70\xfb\x42\xa4\x06\x00\x00") func runtimeSyntaxCMicroBytes() ([]byte, error) { return bindataRead( diff --git a/runtime/syntax/c.micro b/runtime/syntax/c.micro index 035df1ca..10a3b8ad 100644 --- a/runtime/syntax/c.micro +++ b/runtime/syntax/c.micro @@ -2,13 +2,13 @@ ## syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" color identifier "\b[A-Z_][0-9A-Z_]+\b" -color type "\b(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\b" +color type "\b(auto|float|double|bool|char|int|short|long|sizeof|enum|void|static|const|constexpr|struct|union|typedef|extern|(un)?signed|inline)\b" color type "\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\b" color statement "\b(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\b" color statement "\b(for|if|while|do|else|case|default|switch)\b" color statement "\b(try|throw|catch|operator|new|delete)\b" color statement "\b(goto|continue|break|return)\b" -color preproc "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" +color preproc "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" color constant "'([^'\\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" ## @@ -22,6 +22,7 @@ color statement "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" # color magenta "[(){}]" "\[" "\]" color constant.number "\b[0-9]+\b" "\b0x[0-9A-Fa-f]+\b" +color constant.number "\b(true|false)\b" "NULL" ## ## String highlighting. You will in general want your brightblacks and