mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Update Vendor (#16325)
* Add Dependencie Update Script * update gitea.com/lunny/levelqueue * update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-redis/redis/v8 * update github.com/hashicorp/golang-lru * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/olivere/elastic/v7 * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark
This commit is contained in:
		
							
								
								
									
										43
									
								
								vendor/github.com/alecthomas/chroma/lexers/f/fish.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										43
									
								
								vendor/github.com/alecthomas/chroma/lexers/f/fish.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -17,11 +17,32 @@ var Fish = internal.Register(MustNewLazyLexer( | ||||
| )) | ||||
|  | ||||
| func fishRules() Rules { | ||||
| 	keywords := []string{ | ||||
| 		`begin`, `end`, `if`, `else`, `while`, `break`, `for`, `return`, `function`, `block`, | ||||
| 		`case`, `continue`, `switch`, `not`, `and`, `or`, `set`, `echo`, `exit`, `pwd`, `true`, | ||||
| 		`false`, `cd`, `cdh`, `count`, `test`, | ||||
| 	} | ||||
| 	keywordsPattern := Words(`\b`, `\b`, keywords...) | ||||
|  | ||||
| 	builtins := []string{ | ||||
| 		`alias`, `bg`, `bind`, `breakpoint`, `builtin`, `argparse`, `abbr`, `string`, `command`, | ||||
| 		`commandline`, `complete`, `contains`, `dirh`, `dirs`, `disown`, `emit`, `eval`, `exec`, | ||||
| 		`fg`, `fish`, `fish_add_path`, `fish_breakpoint_prompt`, `fish_command_not_found`, | ||||
| 		`fish_config`, `fish_git_prompt`, `fish_greeting`, `fish_hg_prompt`, `fish_indent`, | ||||
| 		`fish_is_root_user`, `fish_key_reader`, `fish_mode_prompt`, `fish_opt`, `fish_pager`, | ||||
| 		`fish_prompt`, `fish_right_prompt`, `fish_status_to_signal`, `fish_svn_prompt`, | ||||
| 		`fish_title`, `fish_update_completions`, `fish_vcs_prompt`, `fishd`, `funced`, | ||||
| 		`funcsave`, `functions`, `help`, `history`, `isatty`, `jobs`, `math`, `mimedb`, `nextd`, | ||||
| 		`open`, `prompt_pwd`, `realpath`, `popd`, `prevd`, `psub`, `pushd`, `random`, `read`, | ||||
| 		`set_color`, `source`, `status`, `suspend`, `trap`, `type`, `ulimit`, `umask`, `vared`, | ||||
| 		`fc`, `getopts`, `hash`, `kill`, `printf`, `time`, `wait`, | ||||
| 	} | ||||
|  | ||||
| 	return Rules{ | ||||
| 		"root": { | ||||
| 			Include("basic"), | ||||
| 			Include("data"), | ||||
| 			Include("interp"), | ||||
| 			Include("data"), | ||||
| 		}, | ||||
| 		"interp": { | ||||
| 			{`\$\(\(`, Keyword, Push("math")}, | ||||
| @@ -29,13 +50,20 @@ func fishRules() Rules { | ||||
| 			{`\$#?(\w+|.)`, NameVariable, nil}, | ||||
| 		}, | ||||
| 		"basic": { | ||||
| 			{`\b(begin|end|if|else|while|break|for|in|return|function|block|case|continue|switch|not|and|or|set|echo|exit|pwd|true|false|cd|count|test)(\s*)\b`, ByGroups(Keyword, Text), nil}, | ||||
| 			{`\b(alias|bg|bind|breakpoint|builtin|command|commandline|complete|contains|dirh|dirs|emit|eval|exec|fg|fish|fish_config|fish_indent|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|isatty|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|random|read|set_color|source|status|trap|type|ulimit|umask|vared|fc|getopts|hash|kill|printf|time|wait)\s*\b(?!\.)`, NameBuiltin, nil}, | ||||
| 			{Words(`(?<=(?:^|\A|;|&&|\|\||\||`+keywordsPattern+`)\s*)`, `(?=;?\b)`, keywords...), Keyword, nil}, | ||||
| 			{`(?<=for\s+\S+\s+)in\b`, Keyword, nil}, | ||||
| 			{Words(`\b`, `\s*\b(?!\.)`, builtins...), NameBuiltin, nil}, | ||||
| 			{`#!.*\n`, CommentHashbang, nil}, | ||||
| 			{`#.*\n`, Comment, nil}, | ||||
| 			{`\\[\w\W]`, LiteralStringEscape, nil}, | ||||
| 			{`(\b\w+)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), nil}, | ||||
| 			{`[\[\]()=]`, Operator, nil}, | ||||
| 			{`[\[\]()={}]`, Operator, nil}, | ||||
| 			{`(?<=\[[^\]]+)\.\.|-(?=[^\[]+\])`, Operator, nil}, | ||||
| 			{`<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil}, | ||||
| 			{`(?<=set\s+(?:--?[^\d\W][\w-]*\s+)?)\w+`, NameVariable, nil}, | ||||
| 			{`(?<=for\s+)\w[\w-]*(?=\s+in)`, NameVariable, nil}, | ||||
| 			{`(?<=function\s+)\w(?:[^\n])*?(?= *[-\n])`, NameFunction, nil}, | ||||
| 			{`(?<=(?:^|\b(?:and|or|sudo)\b|;|\|\||&&|\||\(|(?:\b\w+\s*=\S+\s)) *)\w[\w-]*`, NameFunction, nil}, | ||||
| 		}, | ||||
| 		"data": { | ||||
| 			{`(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"`, LiteralStringDouble, nil}, | ||||
| @@ -43,10 +71,11 @@ func fishRules() Rules { | ||||
| 			{`(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, | ||||
| 			{`(?s)'.*?'`, LiteralStringSingle, nil}, | ||||
| 			{`;`, Punctuation, nil}, | ||||
| 			{`&|\||\^|<|>`, Operator, nil}, | ||||
| 			{`&&|\|\||&|\||\^|<|>`, Operator, nil}, | ||||
| 			{`\s+`, Text, nil}, | ||||
| 			{`\d+(?= |\Z)`, LiteralNumber, nil}, | ||||
| 			{"[^=\\s\\[\\]{}()$\"\\'`\\\\<&|;]+", Text, nil}, | ||||
| 			{`\b\d+\b`, LiteralNumber, nil}, | ||||
| 			{`--?[^\d][\w-]*`, NameAttribute, nil}, | ||||
| 			{".+?", Text, nil}, | ||||
| 		}, | ||||
| 		"string": { | ||||
| 			{`"`, LiteralStringDouble, Pop(1)}, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user