prettier-plugin-solidity 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +48 -9
  2. package/dist/standalone.cjs +3 -0
  3. package/dist/standalone.cjs.map +1 -0
  4. package/package.json +42 -33
  5. package/src/binary-operator-printers/arithmetic.js +12 -14
  6. package/src/binary-operator-printers/assignment.js +4 -6
  7. package/src/binary-operator-printers/bit.js +2 -2
  8. package/src/binary-operator-printers/comparison.js +11 -13
  9. package/src/binary-operator-printers/exponentiation.js +4 -6
  10. package/src/binary-operator-printers/index.js +7 -13
  11. package/src/binary-operator-printers/logical.js +12 -14
  12. package/src/binary-operator-printers/shift.js +2 -2
  13. package/src/clean.js +1 -1
  14. package/src/comments/handler.js +7 -15
  15. package/src/comments/handlers/handleContractDefinitionComments.js +9 -11
  16. package/src/comments/handlers/handleModifierInvocationComments.js +9 -11
  17. package/src/comments/handlers/index.js +5 -3
  18. package/src/comments/ignore.js +1 -1
  19. package/src/comments/index.js +2 -4
  20. package/src/comments/printer.js +5 -10
  21. package/src/common/backward-compatibility.js +46 -0
  22. package/src/common/printer-helpers.js +63 -41
  23. package/src/common/util.js +6 -22
  24. package/src/index.js +14 -12
  25. package/src/loc.js +1 -1
  26. package/src/nodes/ArrayTypeName.js +1 -3
  27. package/src/nodes/AssemblyAssignment.js +4 -8
  28. package/src/nodes/AssemblyBlock.js +6 -11
  29. package/src/nodes/AssemblyCall.js +2 -4
  30. package/src/nodes/AssemblyCase.js +1 -3
  31. package/src/nodes/AssemblyFor.js +4 -8
  32. package/src/nodes/AssemblyFunctionDefinition.js +6 -11
  33. package/src/nodes/AssemblyIf.js +1 -3
  34. package/src/nodes/AssemblyLocalDefinition.js +4 -9
  35. package/src/nodes/AssemblyMemberAccess.js +1 -3
  36. package/src/nodes/AssemblyStackAssignment.js +1 -3
  37. package/src/nodes/AssemblySwitch.js +4 -8
  38. package/src/nodes/BinaryOperation.js +2 -5
  39. package/src/nodes/Block.js +6 -11
  40. package/src/nodes/BooleanLiteral.js +1 -3
  41. package/src/nodes/Break.js +1 -3
  42. package/src/nodes/BreakStatement.js +1 -3
  43. package/src/nodes/CatchClause.js +2 -4
  44. package/src/nodes/Conditional.js +4 -8
  45. package/src/nodes/Continue.js +1 -3
  46. package/src/nodes/ContinueStatement.js +1 -3
  47. package/src/nodes/ContractDefinition.js +11 -17
  48. package/src/nodes/CustomErrorDefinition.js +2 -4
  49. package/src/nodes/DecimalNumber.js +1 -3
  50. package/src/nodes/DoWhileStatement.js +4 -9
  51. package/src/nodes/ElementaryTypeName.js +1 -3
  52. package/src/nodes/EmitStatement.js +1 -3
  53. package/src/nodes/EnumDefinition.js +4 -9
  54. package/src/nodes/EnumValue.js +1 -3
  55. package/src/nodes/EventDefinition.js +2 -4
  56. package/src/nodes/ExpressionStatement.js +4 -9
  57. package/src/nodes/FileLevelConstant.js +1 -3
  58. package/src/nodes/ForStatement.js +4 -9
  59. package/src/nodes/FunctionCall.js +4 -9
  60. package/src/nodes/FunctionDefinition.js +11 -18
  61. package/src/nodes/FunctionTypeName.js +4 -9
  62. package/src/nodes/HexLiteral.js +4 -9
  63. package/src/nodes/HexNumber.js +1 -3
  64. package/src/nodes/Identifier.js +1 -3
  65. package/src/nodes/IfStatement.js +6 -11
  66. package/src/nodes/ImportDirective.js +12 -17
  67. package/src/nodes/IndexAccess.js +4 -8
  68. package/src/nodes/IndexRangeAccess.js +1 -3
  69. package/src/nodes/InheritanceSpecifier.js +2 -4
  70. package/src/nodes/InlineAssemblyStatement.js +3 -4
  71. package/src/nodes/LabelDefinition.js +4 -8
  72. package/src/nodes/Mapping.js +17 -18
  73. package/src/nodes/MemberAccess.js +6 -10
  74. package/src/nodes/ModifierDefinition.js +4 -9
  75. package/src/nodes/ModifierInvocation.js +3 -5
  76. package/src/nodes/NameValueExpression.js +1 -3
  77. package/src/nodes/NameValueList.js +4 -9
  78. package/src/nodes/NewExpression.js +1 -3
  79. package/src/nodes/NumberLiteral.js +1 -3
  80. package/src/nodes/PragmaDirective.js +1 -3
  81. package/src/nodes/ReturnStatement.js +4 -8
  82. package/src/nodes/RevertStatement.js +1 -3
  83. package/src/nodes/SourceUnit.js +4 -9
  84. package/src/nodes/StateVariableDeclaration.js +4 -8
  85. package/src/nodes/StringLiteral.js +5 -9
  86. package/src/nodes/StructDefinition.js +13 -22
  87. package/src/nodes/ThrowStatement.js +1 -3
  88. package/src/nodes/TryStatement.js +6 -11
  89. package/src/nodes/TupleExpression.js +4 -9
  90. package/src/nodes/TypeDefinition.js +1 -3
  91. package/src/nodes/UnaryOperation.js +1 -3
  92. package/src/nodes/UncheckedStatement.js +4 -8
  93. package/src/nodes/UserDefinedTypeName.js +1 -3
  94. package/src/nodes/UsingForDeclaration.js +28 -44
  95. package/src/nodes/VariableDeclaration.js +4 -9
  96. package/src/nodes/VariableDeclarationStatement.js +6 -11
  97. package/src/nodes/WhileStatement.js +4 -9
  98. package/src/nodes/index.js +72 -78
  99. package/src/options.js +1 -1
  100. package/src/parser.js +5 -12
  101. package/src/prettier-comments/language-js/comments.js +13 -23
  102. package/src/printer.js +6 -6
  103. package/dist/standalone.js +0 -3
  104. package/dist/standalone.js.map +0 -1
  105. package/src/prettier-comments/index.js +0 -3
  106. /package/dist/{standalone.js.LICENSE.txt → standalone.cjs.LICENSE.txt} +0 -0
@@ -1,12 +1,9 @@
1
- const {
2
- doc: {
3
- builders: { line, softline }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedList } from '../common/printer-helpers.js';
6
3
 
7
- const { printSeparatedList } = require('../common/printer-helpers');
4
+ const { line, softline } = doc.builders;
8
5
 
9
- const NameValueList = {
6
+ export const NameValueList = {
10
7
  print: ({ node, path, print, options }) =>
11
8
  printSeparatedList(
12
9
  path
@@ -17,5 +14,3 @@ const NameValueList = {
17
14
  }
18
15
  )
19
16
  };
20
-
21
- module.exports = NameValueList;
@@ -1,5 +1,3 @@
1
- const NewExpression = {
1
+ export const NewExpression = {
2
2
  print: ({ path, print }) => ['new ', path.call(print, 'typeName')]
3
3
  };
4
-
5
- module.exports = NewExpression;
@@ -1,8 +1,6 @@
1
- const NumberLiteral = {
1
+ export const NumberLiteral = {
2
2
  print: ({ node }) =>
3
3
  node.subdenomination
4
4
  ? [node.number, ' ', node.subdenomination]
5
5
  : node.number
6
6
  };
7
-
8
- module.exports = NumberLiteral;
@@ -1,5 +1,3 @@
1
- const PragmaDirective = {
1
+ export const PragmaDirective = {
2
2
  print: ({ node }) => ['pragma ', node.name, ' ', node.value, ';']
3
3
  };
4
-
5
- module.exports = PragmaDirective;
@@ -1,8 +1,6 @@
1
- const {
2
- doc: {
3
- builders: { group, indent, line }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+
3
+ const { group, indent, line } = doc.builders;
6
4
 
7
5
  const expression = (node, path, print) => {
8
6
  if (node.expression) {
@@ -13,12 +11,10 @@ const expression = (node, path, print) => {
13
11
  return '';
14
12
  };
15
13
 
16
- const ReturnStatement = {
14
+ export const ReturnStatement = {
17
15
  print: ({ node, path, print }) => [
18
16
  'return',
19
17
  expression(node, path, print),
20
18
  ';'
21
19
  ]
22
20
  };
23
-
24
- module.exports = ReturnStatement;
@@ -1,5 +1,3 @@
1
- const RevertStatement = {
1
+ export const RevertStatement = {
2
2
  print: ({ path, print }) => ['revert ', path.call(print, 'revertCall'), ';']
3
3
  };
4
-
5
- module.exports = RevertStatement;
@@ -1,16 +1,11 @@
1
- const {
2
- doc: {
3
- builders: { line }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printPreservingEmptyLines } from '../common/printer-helpers.js';
6
3
 
7
- const { printPreservingEmptyLines } = require('../common/printer-helpers');
4
+ const { line } = doc.builders;
8
5
 
9
- const SourceUnit = {
6
+ export const SourceUnit = {
10
7
  print: ({ options, path, print }) => [
11
8
  printPreservingEmptyLines(path, 'children', options, print),
12
9
  options.parentParser ? '' : line
13
10
  ]
14
11
  };
15
-
16
- module.exports = SourceUnit;
@@ -1,8 +1,6 @@
1
- const {
2
- doc: {
3
- builders: { group, indent, line }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+
3
+ const { group, indent, line } = doc.builders;
6
4
 
7
5
  const initialValue = (node, path, print) => {
8
6
  if (!node.initialValue) {
@@ -16,12 +14,10 @@ const initialValue = (node, path, print) => {
16
14
  return group([' =', indent([line, path.call(print, 'initialValue')])]);
17
15
  };
18
16
 
19
- const StateVariableDeclaration = {
17
+ export const StateVariableDeclaration = {
20
18
  print: ({ node, path, print }) => [
21
19
  ...path.map(print, 'variables'),
22
20
  initialValue(node, path, print),
23
21
  ';'
24
22
  ]
25
23
  };
26
-
27
- module.exports = StateVariableDeclaration;
@@ -1,11 +1,9 @@
1
- const {
2
- doc: {
3
- builders: { join, hardline }
4
- }
5
- } = require('prettier');
6
- const { printString } = require('../common/util');
1
+ import { doc } from 'prettier';
2
+ import { printString } from '../common/util.js';
3
+
4
+ const { join, hardline } = doc.builders;
7
5
 
8
- const StringLiteral = {
6
+ export const StringLiteral = {
9
7
  print: ({ node, options }) => {
10
8
  const list = node.parts.map(
11
9
  (part, index) =>
@@ -17,5 +15,3 @@ const StringLiteral = {
17
15
  return join(hardline, list);
18
16
  }
19
17
  };
20
-
21
- module.exports = StringLiteral;
@@ -1,29 +1,20 @@
1
- const {
2
- doc: {
3
- builders: { hardline }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedList } from '../common/printer-helpers.js';
6
3
 
7
- const { printSeparatedList } = require('../common/printer-helpers');
4
+ const { hardline } = doc.builders;
8
5
 
9
- const StructDefinition = {
10
- print: ({ node, path, print }) => {
11
- const parts = ['struct ', node.name, ' {'];
12
-
13
- if (node.members.length > 0) {
14
- parts.push(
15
- printSeparatedList(path.map(print, 'members'), {
6
+ export const StructDefinition = {
7
+ print: ({ node, path, print }) => [
8
+ 'struct ',
9
+ node.name,
10
+ ' {',
11
+ node.members.length > 0
12
+ ? printSeparatedList(path.map(print, 'members'), {
16
13
  firstSeparator: hardline,
17
14
  separator: [';', hardline],
18
15
  lastSeparator: [';', hardline]
19
16
  })
20
- );
21
- }
22
-
23
- parts.push('}');
24
-
25
- return parts;
26
- }
17
+ : '',
18
+ '}'
19
+ ]
27
20
  };
28
-
29
- module.exports = StructDefinition;
@@ -1,5 +1,3 @@
1
- const ThrowStatement = {
1
+ export const ThrowStatement = {
2
2
  print: () => 'throw;'
3
3
  };
4
-
5
- module.exports = ThrowStatement;
@@ -1,13 +1,10 @@
1
- const {
2
- doc: {
3
- builders: { join, line }
4
- }
5
- } = require('prettier');
6
-
7
- const {
1
+ import { doc } from 'prettier';
2
+ import {
8
3
  printSeparatedItem,
9
4
  printSeparatedList
10
- } = require('../common/printer-helpers');
5
+ } from '../common/printer-helpers.js';
6
+
7
+ const { join, line } = doc.builders;
11
8
 
12
9
  const returnParameters = (node, path, print) =>
13
10
  node.returnParameters
@@ -18,7 +15,7 @@ const returnParameters = (node, path, print) =>
18
15
  ]
19
16
  : '';
20
17
 
21
- const TryStatement = {
18
+ export const TryStatement = {
22
19
  print: ({ node, path, print }) => {
23
20
  let parts = [
24
21
  'try',
@@ -41,5 +38,3 @@ const TryStatement = {
41
38
  return parts;
42
39
  }
43
40
  };
44
-
45
- module.exports = TryStatement;
@@ -1,10 +1,7 @@
1
- const {
2
- doc: {
3
- builders: { group }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedList } from '../common/printer-helpers.js';
6
3
 
7
- const { printSeparatedList } = require('../common/printer-helpers');
4
+ const { group } = doc.builders;
8
5
 
9
6
  const contents = (node, path, print) =>
10
7
  node.components &&
@@ -13,7 +10,7 @@ const contents = (node, path, print) =>
13
10
  ? path.map(print, 'components')
14
11
  : [printSeparatedList(path.map(print, 'components'))];
15
12
 
16
- const TupleExpression = {
13
+ export const TupleExpression = {
17
14
  print: ({ node, path, print }) =>
18
15
  group([
19
16
  node.isArray ? '[' : '(',
@@ -21,5 +18,3 @@ const TupleExpression = {
21
18
  node.isArray ? ']' : ')'
22
19
  ])
23
20
  };
24
-
25
- module.exports = TupleExpression;
@@ -1,5 +1,3 @@
1
- const TypeDefinition = {
1
+ export const TypeDefinition = {
2
2
  print: ({ node }) => ['type ', node.name, ' is ', node.definition.name, ';']
3
3
  };
4
-
5
- module.exports = TypeDefinition;
@@ -1,4 +1,4 @@
1
- const UnaryOperation = {
1
+ export const UnaryOperation = {
2
2
  print: ({ node, path, print }) =>
3
3
  node.isPrefix
4
4
  ? [
@@ -8,5 +8,3 @@ const UnaryOperation = {
8
8
  ]
9
9
  : [path.call(print, 'subExpression'), node.operator]
10
10
  };
11
-
12
- module.exports = UnaryOperation;
@@ -1,11 +1,7 @@
1
- const {
2
- doc: {
3
- builders: { group }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
6
2
 
7
- const UncheckedStatement = {
3
+ const { group } = doc.builders;
4
+
5
+ export const UncheckedStatement = {
8
6
  print: ({ path, print }) => group(['unchecked ', path.call(print, 'block')])
9
7
  };
10
-
11
- module.exports = UncheckedStatement;
@@ -1,5 +1,3 @@
1
- const UserDefinedTypeName = {
1
+ export const UserDefinedTypeName = {
2
2
  print: ({ node }) => node.namePath
3
3
  };
4
-
5
- module.exports = UserDefinedTypeName;
@@ -1,45 +1,29 @@
1
- const {
2
- doc: {
3
- builders: { line, softline }
4
- }
5
- } = require('prettier');
6
-
7
- const { printSeparatedList } = require('../common/printer-helpers');
8
-
9
- const UsingForDeclaration = {
10
- print: ({ node, path, print, options }) => {
11
- const parts = ['using '];
12
-
13
- if (node.functions && node.functions.length) {
14
- const importedFunctions = [];
15
- for (let i = 0; i < node.functions.length; i += 1) {
16
- const fun = node.functions[i];
17
- const operator = node.operators[i];
18
-
19
- if (operator) {
20
- importedFunctions.push(`${fun} as ${operator}`);
21
- } else {
22
- importedFunctions.push(fun);
23
- }
24
- }
25
-
26
- parts.push('{');
27
- parts.push(
28
- printSeparatedList(importedFunctions, {
29
- firstSeparator: options.bracketSpacing ? line : softline
30
- })
31
- );
32
- parts.push('}');
33
- } else {
34
- parts.push(node.libraryName);
35
- }
36
-
37
- parts.push(' for ');
38
- parts.push(node.typeName ? path.call(print, 'typeName') : '*');
39
- parts.push(node.isGlobal ? ' global;' : ';');
40
-
41
- return parts;
42
- }
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedList } from '../common/printer-helpers.js';
3
+
4
+ const { line, softline } = doc.builders;
5
+
6
+ export const UsingForDeclaration = {
7
+ print: ({ node, path, print, options }) => [
8
+ 'using ',
9
+ node.functions && node.functions.length
10
+ ? [
11
+ '{',
12
+ printSeparatedList(
13
+ node.functions.map((functionName, i) =>
14
+ node.operators[i]
15
+ ? [functionName, ' as ', node.operators[i]]
16
+ : functionName
17
+ ),
18
+ {
19
+ firstSeparator: options.bracketSpacing ? line : softline
20
+ }
21
+ ),
22
+ '}'
23
+ ]
24
+ : node.libraryName,
25
+ ' for ',
26
+ node.typeName ? path.call(print, 'typeName') : '*',
27
+ node.isGlobal ? ' global;' : ';'
28
+ ]
43
29
  };
44
-
45
- module.exports = UsingForDeclaration;
@@ -1,10 +1,7 @@
1
- const {
2
- doc: {
3
- builders: { group, indent, line }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedList } from '../common/printer-helpers.js';
6
3
 
7
- const { printSeparatedList } = require('../common/printer-helpers');
4
+ const { group, indent, line } = doc.builders;
8
5
 
9
6
  const indexed = (node) => (node.isIndexed ? ' indexed' : '');
10
7
 
@@ -35,7 +32,7 @@ const override = (node, path, print) => {
35
32
 
36
33
  const name = (node) => (node.name ? [' ', node.name] : '');
37
34
 
38
- const VariableDeclaration = {
35
+ export const VariableDeclaration = {
39
36
  print: ({ node, path, print }) =>
40
37
  node.typeName
41
38
  ? group([
@@ -52,5 +49,3 @@ const VariableDeclaration = {
52
49
  ])
53
50
  : node.name
54
51
  };
55
-
56
- module.exports = VariableDeclaration;
@@ -1,19 +1,16 @@
1
- const {
2
- doc: {
3
- builders: { group, indentIfBreak }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedList } from '../common/printer-helpers.js';
6
3
 
7
- const { printSeparatedList } = require('../common/printer-helpers');
4
+ const { group, indentIfBreak } = doc.builders;
8
5
 
9
- const embraceVariables = (doc, embrace) =>
10
- embrace ? ['(', printSeparatedList(doc), ')'] : doc;
6
+ const embraceVariables = (document, embrace) =>
7
+ embrace ? ['(', printSeparatedList(document), ')'] : document;
11
8
 
12
9
  const initialValue = (node, path, print) =>
13
10
  node.initialValue ? [' = ', path.call(print, 'initialValue')] : '';
14
11
 
15
12
  let groupIndex = 0;
16
- const VariableDeclarationStatement = {
13
+ export const VariableDeclarationStatement = {
17
14
  print: ({ node, path, print }) => {
18
15
  const startsWithVar =
19
16
  node.variables.filter((x) => x && x.typeName).length === 0;
@@ -40,5 +37,3 @@ const VariableDeclarationStatement = {
40
37
  ]);
41
38
  }
42
39
  };
43
-
44
- module.exports = VariableDeclarationStatement;
@@ -1,17 +1,14 @@
1
- const {
2
- doc: {
3
- builders: { group, indent, line }
4
- }
5
- } = require('prettier');
1
+ import { doc } from 'prettier';
2
+ import { printSeparatedItem } from '../common/printer-helpers.js';
6
3
 
7
- const { printSeparatedItem } = require('../common/printer-helpers');
4
+ const { group, indent, line } = doc.builders;
8
5
 
9
6
  const printBody = (node, path, print) =>
10
7
  node.body.type === 'Block'
11
8
  ? [' ', path.call(print, 'body')]
12
9
  : group(indent([line, path.call(print, 'body')]));
13
10
 
14
- const WhileStatement = {
11
+ export const WhileStatement = {
15
12
  print: ({ node, path, print }) => [
16
13
  'while (',
17
14
  printSeparatedItem(path.call(print, 'condition')),
@@ -19,5 +16,3 @@ const WhileStatement = {
19
16
  printBody(node, path, print)
20
17
  ]
21
18
  };
22
-
23
- module.exports = WhileStatement;
@@ -1,78 +1,72 @@
1
- /* This file was automatically generated on 1666691919.885 */
2
-
3
- /* eslint-disable global-require */
4
-
5
- module.exports = {
6
- ArrayTypeName: require('./ArrayTypeName'),
7
- AssemblyAssignment: require('./AssemblyAssignment'),
8
- AssemblyBlock: require('./AssemblyBlock'),
9
- AssemblyCall: require('./AssemblyCall'),
10
- AssemblyCase: require('./AssemblyCase'),
11
- AssemblyFor: require('./AssemblyFor'),
12
- AssemblyFunctionDefinition: require('./AssemblyFunctionDefinition'),
13
- AssemblyIf: require('./AssemblyIf'),
14
- AssemblyLocalDefinition: require('./AssemblyLocalDefinition'),
15
- AssemblyMemberAccess: require('./AssemblyMemberAccess'),
16
- AssemblyStackAssignment: require('./AssemblyStackAssignment'),
17
- AssemblySwitch: require('./AssemblySwitch'),
18
- BinaryOperation: require('./BinaryOperation'),
19
- Block: require('./Block'),
20
- BooleanLiteral: require('./BooleanLiteral'),
21
- Break: require('./Break'),
22
- BreakStatement: require('./BreakStatement'),
23
- CatchClause: require('./CatchClause'),
24
- Conditional: require('./Conditional'),
25
- Continue: require('./Continue'),
26
- ContinueStatement: require('./ContinueStatement'),
27
- ContractDefinition: require('./ContractDefinition'),
28
- CustomErrorDefinition: require('./CustomErrorDefinition'),
29
- DecimalNumber: require('./DecimalNumber'),
30
- DoWhileStatement: require('./DoWhileStatement'),
31
- ElementaryTypeName: require('./ElementaryTypeName'),
32
- EmitStatement: require('./EmitStatement'),
33
- EnumDefinition: require('./EnumDefinition'),
34
- EnumValue: require('./EnumValue'),
35
- EventDefinition: require('./EventDefinition'),
36
- ExpressionStatement: require('./ExpressionStatement'),
37
- FileLevelConstant: require('./FileLevelConstant'),
38
- ForStatement: require('./ForStatement'),
39
- FunctionCall: require('./FunctionCall'),
40
- FunctionDefinition: require('./FunctionDefinition'),
41
- FunctionTypeName: require('./FunctionTypeName'),
42
- HexLiteral: require('./HexLiteral'),
43
- HexNumber: require('./HexNumber'),
44
- Identifier: require('./Identifier'),
45
- IfStatement: require('./IfStatement'),
46
- ImportDirective: require('./ImportDirective'),
47
- IndexAccess: require('./IndexAccess'),
48
- IndexRangeAccess: require('./IndexRangeAccess'),
49
- InheritanceSpecifier: require('./InheritanceSpecifier'),
50
- InlineAssemblyStatement: require('./InlineAssemblyStatement'),
51
- LabelDefinition: require('./LabelDefinition'),
52
- Mapping: require('./Mapping'),
53
- MemberAccess: require('./MemberAccess'),
54
- ModifierDefinition: require('./ModifierDefinition'),
55
- ModifierInvocation: require('./ModifierInvocation'),
56
- NameValueExpression: require('./NameValueExpression'),
57
- NameValueList: require('./NameValueList'),
58
- NewExpression: require('./NewExpression'),
59
- NumberLiteral: require('./NumberLiteral'),
60
- PragmaDirective: require('./PragmaDirective'),
61
- ReturnStatement: require('./ReturnStatement'),
62
- RevertStatement: require('./RevertStatement'),
63
- SourceUnit: require('./SourceUnit'),
64
- StateVariableDeclaration: require('./StateVariableDeclaration'),
65
- StringLiteral: require('./StringLiteral'),
66
- StructDefinition: require('./StructDefinition'),
67
- ThrowStatement: require('./ThrowStatement'),
68
- TryStatement: require('./TryStatement'),
69
- TupleExpression: require('./TupleExpression'),
70
- TypeDefinition: require('./TypeDefinition'),
71
- UnaryOperation: require('./UnaryOperation'),
72
- UncheckedStatement: require('./UncheckedStatement'),
73
- UserDefinedTypeName: require('./UserDefinedTypeName'),
74
- UsingForDeclaration: require('./UsingForDeclaration'),
75
- VariableDeclaration: require('./VariableDeclaration'),
76
- VariableDeclarationStatement: require('./VariableDeclarationStatement'),
77
- WhileStatement: require('./WhileStatement')
78
- };
1
+ export * from './ArrayTypeName.js';
2
+ export * from './AssemblyAssignment.js';
3
+ export * from './AssemblyBlock.js';
4
+ export * from './AssemblyCall.js';
5
+ export * from './AssemblyCase.js';
6
+ export * from './AssemblyFor.js';
7
+ export * from './AssemblyFunctionDefinition.js';
8
+ export * from './AssemblyIf.js';
9
+ export * from './AssemblyLocalDefinition.js';
10
+ export * from './AssemblyMemberAccess.js';
11
+ export * from './AssemblyStackAssignment.js';
12
+ export * from './AssemblySwitch.js';
13
+ export * from './BinaryOperation.js';
14
+ export * from './Block.js';
15
+ export * from './BooleanLiteral.js';
16
+ export * from './Break.js';
17
+ export * from './BreakStatement.js';
18
+ export * from './CatchClause.js';
19
+ export * from './Conditional.js';
20
+ export * from './Continue.js';
21
+ export * from './ContinueStatement.js';
22
+ export * from './ContractDefinition.js';
23
+ export * from './CustomErrorDefinition.js';
24
+ export * from './DecimalNumber.js';
25
+ export * from './DoWhileStatement.js';
26
+ export * from './ElementaryTypeName.js';
27
+ export * from './EmitStatement.js';
28
+ export * from './EnumDefinition.js';
29
+ export * from './EnumValue.js';
30
+ export * from './EventDefinition.js';
31
+ export * from './ExpressionStatement.js';
32
+ export * from './FileLevelConstant.js';
33
+ export * from './ForStatement.js';
34
+ export * from './FunctionCall.js';
35
+ export * from './FunctionDefinition.js';
36
+ export * from './FunctionTypeName.js';
37
+ export * from './HexLiteral.js';
38
+ export * from './HexNumber.js';
39
+ export * from './Identifier.js';
40
+ export * from './IfStatement.js';
41
+ export * from './ImportDirective.js';
42
+ export * from './IndexAccess.js';
43
+ export * from './IndexRangeAccess.js';
44
+ export * from './InheritanceSpecifier.js';
45
+ export * from './InlineAssemblyStatement.js';
46
+ export * from './LabelDefinition.js';
47
+ export * from './Mapping.js';
48
+ export * from './MemberAccess.js';
49
+ export * from './ModifierDefinition.js';
50
+ export * from './ModifierInvocation.js';
51
+ export * from './NameValueExpression.js';
52
+ export * from './NameValueList.js';
53
+ export * from './NewExpression.js';
54
+ export * from './NumberLiteral.js';
55
+ export * from './PragmaDirective.js';
56
+ export * from './ReturnStatement.js';
57
+ export * from './RevertStatement.js';
58
+ export * from './SourceUnit.js';
59
+ export * from './StateVariableDeclaration.js';
60
+ export * from './StringLiteral.js';
61
+ export * from './StructDefinition.js';
62
+ export * from './ThrowStatement.js';
63
+ export * from './TryStatement.js';
64
+ export * from './TupleExpression.js';
65
+ export * from './TypeDefinition.js';
66
+ export * from './UnaryOperation.js';
67
+ export * from './UncheckedStatement.js';
68
+ export * from './UserDefinedTypeName.js';
69
+ export * from './UsingForDeclaration.js';
70
+ export * from './VariableDeclaration.js';
71
+ export * from './VariableDeclarationStatement.js';
72
+ export * from './WhileStatement.js';
package/src/options.js CHANGED
@@ -48,4 +48,4 @@ const options = {
48
48
  }
49
49
  };
50
50
 
51
- module.exports = options;
51
+ export default options;