Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
1f8a9b3f
Commit
1f8a9b3f
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-08-17 14:29:02 by sof]
removed support for cpp #line directives (not needed anymore)
parent
f4227d3c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/parser/hslexer.flex
+13
-0
13 additions, 0 deletions
ghc/compiler/parser/hslexer.flex
with
13 additions
and
0 deletions
ghc/compiler/parser/hslexer.flex
+
13
−
0
View file @
1f8a9b3f
...
...
@@ -276,8 +276,19 @@ NL [\n\r]
* Special GHC pragma rules. Do we need a start state for interface files,
* so these won't be matched in source files? --JSM
*/
%}
%{
/* I believe the next rule is not ever matched.
The '#line ' rule is un-cool, recognising a cpp directive inside hs source.
Driver has now been modified to output `standard' {-# LINE ..-} pragmas
where possible, so the lexer should now never see cpp directives
like '# ' and '#line'.
-- SOF
<Code,GlaExt>^"# ".*{NL} {
char tempf[FILENAME_SIZE];
sscanf(yytext+1, "%d \"%[^\"]", &hslineno, tempf);
...
...
@@ -291,6 +302,8 @@ NL [\n\r]
new_filename(tempf);
hsplineno = hslineno; hscolno = 0; hspcolno = 0;
}
*/
%}
<Code,GlaExt>"{-# LINE ".*"-}"{NL} {
/* partain: pragma-style line directive */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment