开发者

notwithstanding keyword

开发者 https://www.devze.com 2022-12-24 04:36 出处:网络
What does the notwithstanding keyword mea开发者_C百科n in Google Go?2017 Update: There was a major parser update and the new one no longer seems to support these Easter egg words.

What does the notwithstanding keyword mea开发者_C百科n in Google Go?


2017 Update: There was a major parser update and the new one no longer seems to support these Easter egg words.


Looks like an easter egg in the lexer to me:

https://github.com/golang/go/blob/08e25fc1ba397e02ec776561ed73b7f9a8b94392/src/cmd/compile/internal/gc/lex.go#L2152-L2156

the relevant section is the symbol table:

"notwithstanding",      LIGNORE,    Txxx,       OXXX,
"thetruthofthematter",  LIGNORE,    Txxx,       OXXX,
"despiteallobjections", LIGNORE,    Txxx,       OXXX,
"whereas",              LIGNORE,    Txxx,       OXXX,
"insofaras",            LIGNORE,    Txxx,       OXXX,

I guess they could be used to test handling of the lexical type LIGNORE, but there doesn't seem to be any "real" ignored tokens.


The Go Programming Language Specification does not include the keyword 'notwithstanding'.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号