diff options
author | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2006-12-21 20:48:18 +0000 |
---|---|---|
committer | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2006-12-21 20:48:18 +0000 |
commit | bc5cceae324bc21d8610a169f98e75d32eff4075 (patch) | |
tree | e74932c602b3b9efd603c2629a50543e34bac34d /compiler/scanner.pas | |
parent | a77453ef2c8098fa8793f5112988ffb199c377e8 (diff) | |
download | fpc-bc5cceae324bc21d8610a169f98e75d32eff4075.tar.gz |
* Compiler directives {$...} are allowed in ARM inline assembler. It fixes tb0142.pp and tb0193.pp.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@5664 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/scanner.pas')
-rw-r--r-- | compiler/scanner.pas | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/compiler/scanner.pas b/compiler/scanner.pas index 7de1663dca..c7ee469975 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -3933,12 +3933,23 @@ exit_label: end; repeat case c of -{$ifndef arm} // the { ... } is used in ARM assembler to define register sets, so we can't used - // it as comment, either (* ... *), /* ... */ or // ... should be used instead + // it as comment, either (* ... *), /* ... */ or // ... should be used instead. + // But compiler directives {$...} are allowed in ARM assembler. '{' : - skipcomment; + begin +{$ifdef arm} + readchar; + dec(inputpointer); + if c<>'$' then + begin + asmgetchar:='{'; + exit; + end + else {$endif arm} + skipcomment; + end; #10,#13 : begin linebreak; |