瀏覽代碼

Switch some codeblocks to recognized languages. (#4811)

Fix syntax highlighting for these code blocks.
Richard Smith 1 年之前
父節點
當前提交
e0f9c40f47
共有 5 個文件被更改,包括 11 次插入11 次删除
  1. 3 3
      proposals/p0162.md
  2. 1 1
      proposals/p0285.md
  3. 1 1
      proposals/p0339.md
  4. 2 2
      proposals/p0340.md
  5. 4 4
      proposals/p0353.md

+ 3 - 3
proposals/p0162.md

@@ -315,7 +315,7 @@ the semantic analysis and the specification of runtime behavior.
 
 #### Abstract Syntax for Expressions
 
-```C++
+```c++
 enum ExpressionKind { Variable, PatternVariable, Int, Bool,
                       PrimitiveOp, Call, Tuple, Index, GetField,
                       IntT, BoolT, TypeT, FunctionT, AutoT };
@@ -384,7 +384,7 @@ alternative: identifier tuple ';'
 
 #### Abstract Syntax for Statements
 
-```C++
+```c++
 enum StatementKind { ExpressionStatement, Assign, VariableDefinition,
                      If,  Return, Sequence, Block, While, Break, Continue,
                      Match };
@@ -410,7 +410,7 @@ struct Statement {
 
 #### Abstract Syntax for Declarations
 
-```C++
+```c++
 struct FunctionDefinition {
   string name;
   Expression* param_pattern;

+ 1 - 1
proposals/p0285.md

@@ -45,7 +45,7 @@ A few syntaxes that are likely to influence `if`/`else` are:
 
 -   C++
 
-    ```cc
+    ```c++
     if (x) {
       printf("x is true");
     } else if (y) {

+ 1 - 1
proposals/p0339.md

@@ -85,7 +85,7 @@ Variables are standard in many languages. Some various forms to consider are:
 
 -   C++:
 
-    ```cc
+    ```c++
     int x;
     int y = 0;
     bool a = true, *b = nullptr, c;

+ 2 - 2
proposals/p0340.md

@@ -38,7 +38,7 @@ similar in many languages, even if details may change.
 -   C++: A couple example languages following C++'s syntax closely are Java and
     TypeScript.
 
-    ```cc
+    ```c++
     while (x) {
       DoSomething();
     }
@@ -221,7 +221,7 @@ This proposal does not offer a way to initialize variables in the `while`.
 
 For comparison, C++ does allow declaring a variable in the condition, such as:
 
-```cc
+```c++
 while (optional<T> next = get_next()) { ... }
 ```
 

+ 4 - 4
proposals/p0353.md

@@ -56,7 +56,7 @@ Semisemi `for` loops have been around for a long time, and are in C. Range-based
 
 For example, here is a basic semisemi:
 
-```cc
+```c++
 for (int i = 0; i < list.size(); ++i) {
   printf("List at %d: %s\n", i, list[i].name);
 }
@@ -64,7 +64,7 @@ for (int i = 0; i < list.size(); ++i) {
 
 An equivalent semisemi using iterators and the comma operator may look like:
 
-```cc
+```c++
 int i = 0;
 for (auto it = list.begin(); it != list.end(); ++it, ++i) {
   printf("List at %d: %s\n", i, it->name);
@@ -74,7 +74,7 @@ for (auto it = list.begin(); it != list.end(); ++it, ++i) {
 Range-based syntax can be simpler, but can also make it more difficult if there
 are multiple pieces of interesting information:
 
-```cc
+```c++
 int i = 0;
 for (const auto& x : list) {
   printf("List at %d: %s\n", i, x.name);
@@ -253,7 +253,7 @@ section of the semisemi. The inter-loop evaluation of the third section is
 important given how it interacts with `continue`. In particular, consider the
 loops:
 
-```cc
+```c++
 for (int i = 0; i < 3; ++i) {
   if (i == 1) continue;
   printf("%d\n", i);