From 30c1f25a7a4e180419444c12046348edb0f8fdd0 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 27 Jan 2021 22:30:55 +0000 Subject: [PATCH] Reland "Remove support for # comments." This reverts commit 21b52b60b68758fe745683bb8797b67cd30875c9. Reason for revert: Dawn fixes landed, trying again. Original change's description: > Revert "Remove support for # comments." > > This reverts commit 6e570a936063c751aebdae46106487385cc05661. > > Reason for revert: Missed Dawn tests > > Original change's description: > > Remove support for # comments. > > > > This CL removes support for parsing # style comments. Only the // > > comments are accepted now. > > > > Change-Id: I062c2a86149ecf828723c74f7168243678ee5870 > > Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/38823 > > Commit-Queue: dan sinclair > > Commit-Queue: Ben Clayton > > Auto-Submit: dan sinclair > > Reviewed-by: Ben Clayton > > TBR=dneto@google.com,dsinclair@chromium.org,bclayton@google.com > > Change-Id: Iaf19ab9def92ad10c27d70480d259e25f3da719d > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39061 > Reviewed-by: dan sinclair > Commit-Queue: dan sinclair TBR=dneto@google.com,dsinclair@chromium.org,bclayton@google.com # Not skipping CQ checks because this is a reland. Change-Id: I91a478237bc9853108e1ce97b9fdc2ce01841998 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/39221 Reviewed-by: dan sinclair Reviewed-by: Ben Clayton Commit-Queue: dan sinclair --- src/reader/wgsl/lexer.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/reader/wgsl/lexer.cc b/src/reader/wgsl/lexer.cc index 52a851c306..9a2200bbb7 100644 --- a/src/reader/wgsl/lexer.cc +++ b/src/reader/wgsl/lexer.cc @@ -143,8 +143,7 @@ void Lexer::skip_whitespace() { } void Lexer::skip_comments() { - // TODO(bclayton): Remove support for # comments - if (!matches(pos_, "#") && !matches(pos_, "//")) { + if (!matches(pos_, "//")) { return; }