title: Why am I getting "'If' is a reserved keyword" error?
body: <p>This is my first time attempting to use an IF condition in the Robot Framework and I am finding it to be surprisingly hard.  My test fails with the message: <strong>'If' is a reserved keyword.</strong>  Well, yes -- and I want to use that keyword!</p>
  <p>Here's the snippet of relevant code.</p>
  <pre><code>    # Column lookup using ${heading}
      @{heading_list}  Create List
      @{header_element_list}  Get WebElements  ${table_headers_locator}
      FOR  ${element}  IN  @{header_element_list}
          Append To List  ${heading_list}  ${element.text}
      END
      ${col}  Get Index From List  ${heading_list}  ${heading}
      IF  ${col} &lt; 0
          Fail  Heading '${heading}' not found in table.
      END
  </code></pre>
  <p>I'm working in PyCharm, with a Robot Framework code syntax highlighting plugin.  The plugin also seems to think that there's something amiss with the IF condition; note that its keywords are colored light blue, whereas the keywords in the FOR loop immediately above it are colored orange.</p>
  <p><a href="https://i.stack.imgur.com/i1yIE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i1yIE.png" alt="enter image description here" /></a></p>
  <p>I believe that my IF statement conforms to the simplest example of an IF statement, as shown in the Robot Framework documentation here: <a href="https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#advanced-features" rel="nofollow noreferrer">https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#advanced-features</a>.  Please help me to understand why this is not the case.  Thanks!</p>