Skip to content

Commit 185cdac

Browse files
authored
feat: fix parenthesis formatting issue (#132)
1 parent af6b803 commit 185cdac

File tree

58 files changed

+478
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+478
-478
lines changed

docs/contributor-guide/compiler-guide/03-00-the-vala-compiler/03-02-parser.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ the parser is a hand-crafted recursive descent parser. The parser is in
1414
`vala/valaparser.vala` and its lexer is in `vala/valascanner.vala`.
1515
:::
1616

17-
The entry point of the parser is `Vala.Parser.parse()`. This method is
18-
called by `Vala.Compiler.run()`. Vala.Parser is an implementation of
17+
The entry point of the parser is `Vala.Parser.parse ()`. This method is
18+
called by `Vala.Compiler.run ()`. Vala.Parser is an implementation of
1919
`Vala.CodeVisitor` for source files.
2020

2121
## 3.2.1. Visitors and Ping Pong
@@ -220,21 +220,21 @@ specializations of CodeNode may have children. The type and number of
220220
children are declared in the specialized class.
221221

222222
The two important methods in a CodeNode are *accept* and
223-
*accept_children*. The accept() method lets the node declare to the
223+
*accept_children*. The accept () method lets the node declare to the
224224
CodeVisitor what it is, so the CodeVisitor can act on it. For example,
225-
Vala.Struct.accept():
225+
Vala.Struct.accept ():
226226

227227
```vala
228228
public override void accept (CodeVisitor visitor) {
229229
visitor.visit_struct (this); /* I am a struct! */
230230
}
231231
```
232232

233-
The accept_children() method lets the node accept all of its children so
233+
The accept_children () method lets the node accept all of its children so
234234
they can declare themselves to the CodeVisitor. This is the recursive
235235
part of the traversal. For example, a Struct code node has a list of
236236
base types, type parameters, fields, constants, and methods.
237-
Vala.Struct.accept_children() accepts all of these.
237+
Vala.Struct.accept_children () accepts all of these.
238238

239239
```vala
240240
public override void accept_children (CodeVisitor visitor) {
@@ -267,7 +267,7 @@ public override void accept_children (CodeVisitor visitor) {
267267
As you can see, the CodeVisitor is repeatedly asked to visit different
268268
code nodes. It can do whatever analysis is necessary and then traverse
269269
deeper into the code tree. This is what a hypothetical implementation of
270-
XmlGenerator.visit_struct() might look like:
270+
XmlGenerator.visit_struct () might look like:
271271

272272
```vala
273273
public override void visit_struct (Struct st) {
@@ -284,7 +284,7 @@ public override void visit_struct (Struct st) {
284284
```
285285

286286
The visit_ methods of a CodeVisitor needn't call
287-
CodeNode.accept_children(), if it isn't necessary to traverse the whole
287+
CodeNode.accept_children (), if it isn't necessary to traverse the whole
288288
depth of the code tree. It also isn't necessary to write visit_
289289
methods for every kind of code node, because empty implementations are
290290
already provided in CodeVisitor.

docs/contributor-guide/compiler-guide/03-00-the-vala-compiler/03-03-semantic-analyzer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ are used in emitted C code.
1313

1414
All attributes except for Conditional are handled from
1515
Vala.AttributeProcessor. I don't know where and how conditional is
16-
handled, but there is a function ignore_node() in Vala.CodeContext.
16+
handled, but there is a function ignore_node () in Vala.CodeContext.
1717

1818
Vala.AttributeProcessor is a CodeVisitor which simply calls the
19-
process_attributes() method on every namespace, class, struct,
19+
process_attributes () method on every namespace, class, struct,
2020
interface, enum, method, constructor, parameter, property, delegate,
2121
constant, field, and signal that it visits.
2222

@@ -26,7 +26,7 @@ the attribute is called "CCode", then the process_ccode_attributes()
2626
function will be called to parse the key-value pairs supplied.
2727

2828
::: info TODO
29-
Mention Vala.Parser.set_attributes()
29+
Mention Vala.Parser.set_attributes ()
3030

3131
Feel free to help: [Vala Docs Repository](https://github.com/vala-lang/vala-docs).
3232
:::

docs/contributor-guide/compiler-guide/03-00-the-vala-compiler/03-04-symbol-resolution.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ when a class is visited, current_scope is set to that class's scope.
3131

3232
When the parser parses a type, e.g. in the statement Gtk.Window
3333
main_window;, the type Gtk.Window is initially a Vala.UnresolvedType. In
34-
visit_data_type(), the UnresolvedType code node asks its parent to
35-
replace it with a new Vala.DataType created with resolve_type().
34+
visit_data_type (), the UnresolvedType code node asks its parent to
35+
replace it with a new Vala.DataType created with resolve_type ().
3636

37-
UnresolvedTypes have UnresolvedSymbols. resolve_type() uses
38-
resolve_symbol() to find the Typesymbol referred to, and then wraps it
37+
UnresolvedTypes have UnresolvedSymbols.resolve_type () uses
38+
resolve_symbol () to find the Typesymbol referred to, and then wraps it
3939
in a new DataType object.
4040

41-
resolve_symbol() is a recursive method which looks up an unresolved
41+
resolve_symbol () is a recursive method which looks up an unresolved
4242
symbol's name in the current scope and returns the corresponding
4343
Typesymbol. The base case is when the UnresolvedSymbol has no
4444
qualifiers, e.g. Window. The recursive case is when the symbol looks
4545
like Gtk.Window or Gtk.Orientation.HORIZONTAL. In
46-
Vala.Parser.parse_symbol_name(), the symbol is built inside-out, so
46+
Vala.Parser.parse_symbol_name (), the symbol is built inside-out, so
4747
Gtk.Orientation.HORIZONTAL is parsed as:
4848

4949
```vala
@@ -62,10 +62,10 @@ the symbol is not found there, then the scope of all imported namespaces
6262
is searched. If more than one imported namespace contains the symbol, an
6363
"ambiguous reference" error will be reported.
6464

65-
In the recursive case, resolve_symbol() is called on the child node to
65+
In the recursive case, resolve_symbol () is called on the child node to
6666
give a parent scope, in which the symbol is looked up.
6767

68-
One last function of SymbolResolver is in visit_variable_declarator() -
68+
One last function of SymbolResolver is in visit_variable_declarator () -
6969
to mark a variable type reference as "nullable" if the variable's
7070
type is a class, interface, array or error (reference type). This is
7171
used later by Vala.NullChecker.

docs/developer-guides/bindings/generating-a-vapi-with-gobject-introspection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ If the icon name isn't known, a “broken image” icon will be
107107
displayed instead. If the current icon theme is changed, the icon
108108
will be updated appropriately.
109109
110-
This function is a convenience wrapper around gtk_button_new() and
111-
gtk_button_set_image().</doc>
110+
This function is a convenience wrapper around gtk_button_new () and
111+
gtk_button_set_image ().</doc>
112112
<return-value transfer-ownership="none">
113113
<doc xml:space="preserve">a new #GtkButton displaying the themed icon</doc>
114114
<type name="Widget" c:type="GtkWidget*"/>

docs/developer-guides/bindings/writing-a-vapi-manually/02-00-getting-started/02-04-create-a-root-namespace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace, e.g.:
1616

1717
```vala
1818
void main () {
19-
Foo.library_function();
19+
Foo.library_function ();
2020
}
2121
```
2222

docs/developer-guides/bindings/writing-a-vapi-manually/04-00-recognizing-vala-semantics-in-c-code/04-02-enums-and-flags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ var foo_enum = (Foo) FooExtended.C;
110110
In Vala, enums and flags may have member functions and constants.
111111
In particular, `strerr`-like functions are best converted to member functions.
112112

113-
### Enum aliases and `to_string()`
113+
### Enum aliases and `to_string ()`
114114

115-
The default function `to_string()` can cause problems if the enum has aliases (the C error `duplicate case` will trigger). So to solve this,
115+
The default function `to_string ()` can cause problems if the enum has aliases (the C error `duplicate case` will trigger). So to solve this,
116116
you can create additional constants after the enum has been declared to add the missing enum aliases.
117117

118118
For example this enum:

docs/developer-guides/bindings/writing-a-vapi-manually/04-00-recognizing-vala-semantics-in-c-code/04-06-functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ VAPI file for the `sync` system call:
66

77
```vala
88
[CCode (cname = "sync")]
9-
void sync();
9+
void sync ();
1010
```
1111

1212
The ccode attribute, `cname`, specifies the C name to use. This avoids
1313
`valac` appending the current namespace to the function name, ensuring
14-
that a call to `Posix.sync()` in vala will map to a call to `sync()` in
15-
C, and not to `posix_sync()`.
14+
that a call to `Posix.sync ()` in vala will map to a call to `sync ()` in
15+
C, and not to `posix_sync ()`.

docs/developer-guides/bindings/writing-a-vapi-manually/06-00-adding-vala-friendly-semantics/06-02-properties.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ implementations will provide a collection of functions to query state
66
about the instance. These can be converted to properties given the
77
following:
88

9-
- The `get` method has the signature `T get(I self)` and the set
10-
method has the signature `void set(I self, T val)`. They need not
9+
- The `get` method has the signature `T get (I self)` and the set
10+
method has the signature `void set (I self, T val)`. They need not
1111
actually occur in pairs.
1212
- The `get` method does not have side effects that are not obvious to
1313
the user.

docs/developer-guides/bindings/writing-a-vapi-manually/07-00-binding-a-c-function-s-parameter-and-return-types/07-02-structs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct Foo {
2222
public int x;
2323
public int y;
2424
};
25-
void compute_foo(Foo f);
25+
void compute_foo (Foo f);
2626
```
2727

2828
Very rarely a C library function is written to receive a struct passed
@@ -48,5 +48,5 @@ public struct Foo {
4848
public int x;
4949
public int y;
5050
}
51-
void compute_foo(Foo f);
51+
void compute_foo (Foo f);
5252
```

docs/developer-guides/bindings/writing-a-vapi-manually/08-00-binding-a-c-struct-s-fields/08-04-function-pointers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef struct {
1818
1919
```vala
2020
[CCode (cname = "foo_func")]
21-
public delegate void FooFunc(int a);
21+
public delegate void FooFunc (int a);
2222
2323
public struct Foo {
2424
[CCode (delegate_target_cname = "callback_context")]
@@ -44,7 +44,7 @@ typedef struct {
4444
4545
```vala
4646
[CCode (cname = "foo_func")]
47-
public delegate void FooFunc(int a);
47+
public delegate void FooFunc (int a);
4848
4949
public struct Foo {
5050
[CCode (delegate_target_cname = "callback_context", delegate_target_destroy_notify_cname = "callback_free")]

0 commit comments

Comments
 (0)