Class ForeignSyntax

java.lang.Object
org.ek9lang.compiler.repair.ForeignSyntax

final class ForeignSyntax extends Object
Spellings carried over from other languages that EK9 writes one way and parses no other way. Each rule rewrites only code (never the inside of a String or a comment - see SourceLines.masked(String)) and only on the line the parser stopped on (or, for a generic type, the line before - the parser notices it a line late):
  • && / || - EK9's and / or;
  • a trailing : on a control line (if x:, else:, while x:) - Python's block colon; EK9 blocks are opened by indentation alone;
  • a # comment line - //;
  • a C block comment (slash-star ... star-slash) - EK9's <!- ... -!>;
  • List<String>() / as List<String> / Dict<K, V> - EK9's List() of String / List of String / Dict of (K, V).