diff options
author | Matt Godbolt <matt@godbolt.org> | 2022-05-09 23:13:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 23:13:50 -0500 |
commit | f2c1e0bd315fbce55582c440f2d3c8c922a5083a (patch) | |
tree | c726d7e1e56fe5b97db357dd0f8c9517c90ddaeb /lib/compilers/pascal.js | |
parent | 141fa735217859d5ebc2985c5eabd2a780246485 (diff) | |
download | compiler-explorer-f2c1e0bd315fbce55582c440f2d3c8c922a5083a.tar.gz compiler-explorer-f2c1e0bd315fbce55582c440f2d3c8c922a5083a.zip |
The Grand Reformat (#3643)gh-2830
* The Grand Reformat
- everything made prettier...literally
- some tweaks to include a few more files, including documentation
- minor changes to format style
- some tiny `// prettier-ignore` changes to keep a few things the way we like them
- a couple of super minor tweaks to embedded document types to ensure they format correctly
Diffstat (limited to 'lib/compilers/pascal.js')
-rw-r--r-- | lib/compilers/pascal.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/compilers/pascal.js b/lib/compilers/pascal.js index 2da67f83e..33980a072 100644 --- a/lib/compilers/pascal.js +++ b/lib/compilers/pascal.js @@ -27,11 +27,11 @@ import path from 'path'; import fs from 'fs-extra'; import _ from 'underscore'; -import { BaseCompiler } from '../base-compiler'; +import {BaseCompiler} from '../base-compiler'; import * as utils from '../utils'; -import { PascalParser } from './argument-parsers'; -import { PascalUtils } from './pascal-utils'; +import {PascalParser} from './argument-parsers'; +import {PascalUtils} from './pascal-utils'; export class FPCCompiler extends BaseCompiler { static get key() { @@ -113,12 +113,9 @@ export class FPCCompiler extends BaseCompiler { const lastLinefeedBeforeStart = input.lastIndexOf('\n', relevantAsmStartsAt); if (lastLinefeedBeforeStart !== -1) { input = - input.substr(0, input.indexOf('00000000004')) + '\n' + - input.substr(lastLinefeedBeforeStart + 1); + input.substr(0, input.indexOf('00000000004')) + '\n' + input.substr(lastLinefeedBeforeStart + 1); } else { - input = - input.substr(0, input.indexOf('00000000004')) + '\n' + - input.substr(relevantAsmStartsAt); + input = input.substr(0, input.indexOf('00000000004')) + '\n' + input.substr(relevantAsmStartsAt); } } return input; @@ -129,11 +126,14 @@ export class FPCCompiler extends BaseCompiler { } async saveDummyProjectFile(filename, unitName, unitPath) { - await fs.writeFile(filename, + await fs.writeFile( + filename, + // prettier-ignore 'program prog;\n' + 'uses ' + unitName + ' in \'' + unitPath + '\';\n' + 'begin\n' + - 'end.\n'); + 'end.\n', + ); } async writeAllFiles(dirPath, source, files, filters) { |