github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/optgen/cmd/optfmt/testdata/comments (about)

     1  pretty
     2  # Com1
     3  # More com1
     4  # Blah 1
     5  
     6  # Yes
     7  
     8  # Def 1
     9  # Def 2
    10  define And {
    11  	# Before
    12  	# Second
    13  	Left ScalarExpr # Left input
    14  	Right ScalarExpr
    15  
    16  	# Two in a row.
    17  	# Another
    18  	L E
    19  	R E
    20  	# 2
    21  	M E
    22  } # PostDef
    23  
    24  
    25  # Even more com1
    26  
    27  # Com2
    28  [
    29  Blah
    30  ]
    31  (Select
    32  $a:*
    33  b
    34  )
    35  =>
    36  (
    37  False $a
    38  )
    39  
    40  # End com
    41  # More end com
    42  
    43  # End com 3
    44  
    45  
    46  
    47  ----
    48  ----
    49  # Com1
    50  # More com1
    51  # Blah 1
    52  
    53  # Yes
    54  
    55  # Def 1
    56  # Def 2
    57  define And {
    58      # Before
    59      # Second
    60      Left ScalarExpr
    61  
    62      # Left input
    63      Right ScalarExpr
    64  
    65      # Two in a row.
    66      # Another
    67      L E
    68      R E
    69  
    70      # 2
    71      M E
    72  }
    73  
    74  # PostDef
    75  
    76  # Even more com1
    77  
    78  # Com2
    79  [Blah]
    80  (Select $a:* b)
    81  =>
    82  (False $a)
    83  
    84  # End com
    85  # More end com
    86  
    87  # End com 3
    88  ----
    89  ----
    90  
    91  # Comments not allowed at end of a define.
    92  pretty
    93  define D {
    94  	N E
    95  	# After
    96  }
    97  ----
    98  ERROR: .:4:1: comments not allowed before closing }: [# After]
    99  
   100  # Comments within tags or between tags and defines are pushed above
   101  # the tag.
   102  pretty
   103  # C1
   104  [T
   105  # CT
   106  ]
   107  # C2
   108  define D {
   109  	N E
   110  }
   111  ----
   112  ERROR: .:4:1: comments not allowed before ]
   113  
   114  # Comments anywhere in a rule are pushed to the top of the rule.
   115  pretty
   116  # C0
   117  [R]
   118  # C1R
   119  (S
   120  )
   121  =>
   122  # C4
   123  (
   124  # C5
   125  S
   126  ) # C7
   127  ----
   128  ----
   129  # C0
   130  [R]
   131  # C1R
   132  (S)
   133  =>
   134  # C4
   135  (
   136      # C5
   137      S
   138  )
   139  
   140  # C7
   141  ----
   142  ----