Home | History | Annotate | Download | only in test_parser
      1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved.
      2    Use of this source code is governed by a BSD-style license that can be
      3   found in the LICENSE file. */
      4 
      5 /* Test Typedef productions
      6 
      7 Run with --test to generate an AST and verify that all comments accurately
      8 reflect the state of the Nodes.
      9 
     10 BUILD Type(Name)
     11 This comment signals that a node of type <Type> is created with the
     12 name <Name>.
     13 
     14 ERROR Error String
     15 This comment signals that a error of <Error String> is generated.  The error
     16 is not assigned to a node, but are expected in order.
     17 
     18 PROP Key=Value
     19 This comment signals that a property has been set on the Node such that
     20 <Key> = <Value>.
     21 
     22 TREE
     23 Type(Name)
     24   Type(Name)
     25   Type(Name)
     26     Type(Name)
     27     ...
     28 This comment signals that a tree of nodes matching the BUILD comment
     29 symatics should exist.  This is an exact match.
     30 */
     31 
     32 /* TREE
     33  *Label(Chrome1)
     34  *  LabelItem(M13)
     35  */
     36 label Chrome1 {
     37   M13 = 0.0
     38 };
     39 
     40 /* TREE
     41  *Label(Chrome2)
     42  *  LabelItem(M12)
     43  *  LabelItem(M13)
     44  */
     45 label Chrome2 {
     46   M12 = 1.0,
     47   M13 = 2.0,
     48 };