cCommonRules top-level constant

List<Rule> const cCommonRules

Rules shared by C, C++ and Objective-C.

Implementation

const cCommonRules = <Rule>[
  Preprocessor(),
  BlockComment('/**', '*/', scope: Scopes.commentDoc),
  BlockComment('/*', '*/'),
  LineComment('///', scope: Scopes.commentDoc),
  LineComment('//'),
  QuotedString('"', prefix: r'(?:u8|[uUL])?'),
  // Character literals: 'a', '\n', L'x'.
  TokenRule(r"(?:u8|[uUL])?'(?:[^'\\\n]|\\[^\n]+?)'", scope: Scopes.string),
  Numbers(octal: false, separator: "'", suffix: '[uUlLfFzZ]{0,3}'),
];