Fix a bug in the .mlir lexer, where a \0 character in a file is treated as a colon...
authorChris Lattner <clattner@nondot.org>
Mon, 23 Mar 2020 22:39:32 +0000 (15:39 -0700)
committerChris Lattner <clattner@nondot.org>
Tue, 24 Mar 2020 00:35:17 +0000 (17:35 -0700)
commit4a219bf7ff6fbe5cbd3b0c2120c8fe471e3f60fa
tree60425626a5c3bfc347837993beace7ad2c15d1d6
parentf09f4b26762ab5d5c15ab6f66eb02a497c5f0b8e
Fix a bug in the .mlir lexer, where a \0 character in a file is treated as a colon (due to an accidental fall through) instead of whitespace.

Summary:
While here, simplify the lexer a bit by eliminating the unneeded 'operator'
classification of certain sigils, they can just be treated as 'punctuation'.

Reviewers: rriddle!

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76647
mlir/lib/Parser/Lexer.cpp
mlir/lib/Parser/Token.cpp
mlir/lib/Parser/Token.h
mlir/lib/Parser/TokenKinds.def
mlir/test/IR/parser.mlir