...

Text file src/oss.terrastruct.com/d2/testdata/d2parser/TestParse/primary.exp.json

Documentation: oss.terrastruct.com/d2/testdata/d2parser/TestParse

     1{
     2  "ast": {
     3    "range": "d2/testdata/d2parser/TestParse/primary.d2,0:0:0-17:0:743",
     4    "nodes": [
     5      {
     6        "map_key": {
     7          "range": "d2/testdata/d2parser/TestParse/primary.d2,1:0:1-16:1:742",
     8          "edges": [
     9            {
    10              "range": "d2/testdata/d2parser/TestParse/primary.d2,1:0:1-1:6:7",
    11              "src": {
    12                "range": "d2/testdata/d2parser/TestParse/primary.d2,1:0:1-1:1:2",
    13                "path": [
    14                  {
    15                    "unquoted_string": {
    16                      "range": "d2/testdata/d2parser/TestParse/primary.d2,1:0:1-1:1:2",
    17                      "value": [
    18                        {
    19                          "string": "x",
    20                          "raw_string": "x"
    21                        }
    22                      ]
    23                    }
    24                  }
    25                ]
    26              },
    27              "src_arrow": "",
    28              "dst": {
    29                "range": "d2/testdata/d2parser/TestParse/primary.d2,1:5:6-1:6:7",
    30                "path": [
    31                  {
    32                    "unquoted_string": {
    33                      "range": "d2/testdata/d2parser/TestParse/primary.d2,1:5:6-1:6:7",
    34                      "value": [
    35                        {
    36                          "string": "y",
    37                          "raw_string": "y"
    38                        }
    39                      ]
    40                    }
    41                  }
    42                ]
    43              },
    44              "dst_arrow": ">"
    45            }
    46          ],
    47          "primary": {
    48            "unquoted_string": {
    49              "range": "d2/testdata/d2parser/TestParse/primary.d2,1:8:9-1:9:10",
    50              "value": [
    51                {
    52                  "substitution": {
    53                    "range": "d2/testdata/d2parser/TestParse/primary.d2,1:8:9-1:18:19",
    54                    "spread": false,
    55                    "path": [
    56                      {
    57                        "unquoted_string": {
    58                          "range": "d2/testdata/d2parser/TestParse/primary.d2,1:10:11-1:14:15",
    59                          "value": [
    60                            {
    61                              "string": "meow",
    62                              "raw_string": "meow"
    63                            }
    64                          ]
    65                        }
    66                      },
    67                      {
    68                        "unquoted_string": {
    69                          "range": "d2/testdata/d2parser/TestParse/primary.d2,1:15:16-1:17:18",
    70                          "value": [
    71                            {
    72                              "string": "ok",
    73                              "raw_string": "ok"
    74                            }
    75                          ]
    76                        }
    77                      }
    78                    ]
    79                  }
    80                }
    81              ]
    82            }
    83          },
    84          "value": {
    85            "map": {
    86              "range": "d2/testdata/d2parser/TestParse/primary.d2,1:19:20-16:1:742",
    87              "nodes": [
    88                {
    89                  "map_key": {
    90                    "range": "d2/testdata/d2parser/TestParse/primary.d2,2:1:23-15:1:740",
    91                    "key": {
    92                      "range": "d2/testdata/d2parser/TestParse/primary.d2,2:1:23-2:6:28",
    93                      "path": [
    94                        {
    95                          "unquoted_string": {
    96                            "range": "d2/testdata/d2parser/TestParse/primary.d2,2:1:23-2:6:28",
    97                            "value": [
    98                              {
    99                                "string": "label",
   100                                "raw_string": "label"
   101                              }
   102                            ]
   103                          }
   104                        }
   105                      ]
   106                    },
   107                    "primary": {},
   108                    "value": {
   109                      "block_string": {
   110                        "range": "d2/testdata/d2parser/TestParse/primary.d2,2:8:30-15:1:740",
   111                        "quote": "",
   112                        "tag": "md",
   113                        "value": "\"Hi, I'm Preston A. Mantis, president of Consumers Retail Law Outlet. As you\ncan see by my suit and the fact that I have all these books of equal height\non the shelves behind me, I am a trained legal attorney. Do you have a car\nor a job?  Do you ever walk around?  If so, you probably have the makings of\nan excellent legal case.  Although of course every case is different, I\nwould definitely say that based on my experience and training, there's no\nreason why you shouldn't come out of this thing with at least a cabin\ncruiser.\n\n\"Remember, at the Preston A. Mantis Consumers Retail Law Outlet, our motto\nis: 'It is very difficult to disprove certain kinds of pain.'\"\n\t\t-- Dave Barry, \"Pain and Suffering\""
   114                      }
   115                    }
   116                  }
   117                }
   118              ]
   119            }
   120          }
   121        }
   122      }
   123    ]
   124  },
   125  "err": null
   126}

View as plain text