diff --git a/highlighting/highlightjs_carbon_lang.js b/highlighting/highlightjs_carbon_lang.js index 9f829373bed5..2651bbc546df 100644 --- a/highlighting/highlightjs_carbon_lang.js +++ b/highlighting/highlightjs_carbon_lang.js @@ -9,7 +9,6 @@ * Category: common, system * Website: https://github.com/carbon-language/carbon-lang/ * - * TODO: local `var` and `let` declarations. * TODO: struct literals. * TODO: abstract, virtual, impl on methods. * TODO: private, protected. @@ -88,7 +87,7 @@ export default function (hljs) { // But it is harmless to give them nicer syntax highlighting. Eventually, as // the language settles, we can explore specifically highlighting operators // that aren't valid as errors. - const PUNCTUATION = [/->/, /\./, /:!?/, /;/]; + const PUNCTUATION = [/->/, /\./]; const OPERATORS = [ />>=/, /<=>/, @@ -117,7 +116,6 @@ export default function (hljs) { /&/, /\\/, /\^/, - /=/, /!/, />/, / i64 { var i: i64 = -1; + let (x: i64, var y: i64) = (1, 2); for (e: T in s) { if (e <= s.Last()) { @@ -49,7 +50,7 @@ constraint WidgetC { } base class Widget { - fn Print[addr me: Self*](var i: i64, x: f32, _: bool); + fn Print[addr me: Self*](var i: i64, x: f32 = 4.2, _: bool); } fn Widget.Print[addr me: Self*](var i: i64, x: f32, _: bool, 47) {