title: Solidity ParserError: Expected identifier but got '='
body: <p>Why does the code below contain an error (<code>ParserError: Expected identifier but got '='</code>).</p>
  
  <pre><code>contract Test {
  
      struct Box {
          uint size;
      }
  
      Box public box;
      box.size = 3;    //&lt;-- error here
  
      constructor() public {
      }
  
  }
  </code></pre>
  
  <p>It works if I put the <code>box.size = 3;</code> into the <code>constructor</code>!</p>
  
  <pre><code>contract Test {
  
      struct Box {
          uint size;
      }
  
      Box public box;
  
      constructor() public {
          box.size = 3;
      }
  
  }
  </code></pre>