title: Parse complex YAML-structure with YAML.mapping
body: <p>I have complex structure in YAML like this</p>
  
  <pre><code>yaml = &lt;&lt;-STR
  'Tunisie Telecom':
    regex: 'StarTrail TT[);/ ]'
    device: 'smartphone'
    model: 'StarTrail'
  
  Palm:
    regex: '(?:Pre|Pixi)/(\d+)\.(\d+)|Palm|Treo|Xiino'
    device: 'smartphone'
    models:
      - regex: '((?:Pre|Pixi))/(\d+\.\d+)'
        model: '$1 $2'
      - regex: 'Palm(?:[ \-])?((?!OS|Source|scape)[a-z0-9]+)'
        model: '$1'
  STR
  </code></pre>
  
  <p>I'm try to parse it with YAML.mapping:</p>
  
  <pre><code>class Mobile
    YAML.mapping(
      name: Hash(String, Hash(String, String))
    )
  end
  
  puts Mobile.from_yaml(yaml)
  </code></pre>
  
  <p>And got parse exception:</p>
  
  <pre><code>Missing yaml attribute: name at line 1, column 1 (YAML::ParseException)
    from /usr/local/Cellar/crystal-lang/0.24.2_1/src/yaml/nodes/nodes.cr:30:9 in 'raise'
    from mobiles_mapping.cr:0:3 in 'initialize'
    from mobiles_mapping.cr:20:3 in 'new'
    from /usr/local/Cellar/crystal-lang/0.24.2_1/src/yaml/from_yaml.cr:2:3 in 'from_yaml'
    from mobiles_mapping.cr:25:1 in '__crystal_main'
    from /usr/local/Cellar/crystal-lang/0.24.2_1/src/crystal/main.cr:11:3 in '_crystal_main'
    from /usr/local/Cellar/crystal-lang/0.24.2_1/src/crystal/main.cr:112:5 in 'main_user_code'
    from /usr/local/Cellar/crystal-lang/0.24.2_1/src/crystal/main.cr:101:7 in 'main'
    from /usr/local/Cellar/crystal-lang/0.24.2_1/src/crystal/main.cr:135:3 in 'main'
  </code></pre>
  
  <p>But if I try to parse with YAML.parse:</p>
  
  <pre><code>{"Tunisie Telecom" =&gt; {"regex" =&gt; "StarTrail TT[);/ ]", "device" =&gt; "smartphone", "model" =&gt; "StarTrail"}, "Palm" =&gt; {"regex" =&gt; "(?:Pre|Pixi)/(d+).(d+)|Palm|Treo|Xiino", "device" =&gt; "smartphone", "models" =&gt; [{"regex" =&gt; "((?:Pre|Pixi))/(d+.d+)", "model" =&gt; "$1 $2"}, {"regex" =&gt; "Palm(?:[ -])?((?!OS|Source|scape)[a-z0-9]+)", "model" =&gt; "$1"}]}}
  </code></pre>
  
  <p>What's my mistake?</p>
  
  <p>Online example: <a href="https://play.crystal-lang.org/#/r/41yk" rel="nofollow noreferrer">https://play.crystal-lang.org/#/r/41yk</a></p>
  
  <p><strong>UPD:</strong> I understood: macros can't found key 'name' but how can parse without key => val like in my case where we have only key?</p>