Skip to content

Commit a8533ec

Browse files
committed
docs: Mark rustdoc codeblocks as text
1 parent 44a4401 commit a8533ec

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/lowering/polymorphism.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! # 1. Method calls within methods (and function block bodies)
1010
//! The reason we want to desugar all method calls within (other) methods is for the fact that a non
1111
//! overridden method may make use of an overridden method. For example consider
12-
//! ```
12+
//! ```text
1313
//! FUNCTION_BLOCK A
1414
//! METHOD getName: STRING
1515
//! getName := 'A';
@@ -54,7 +54,7 @@
5454
//! # 2. Method calls through a pointer variable pointing to a class or function block
5555
//! Essentially what is illustrated in 1. within the main function, consider:
5656
//!
57-
//! ```
57+
//! ```text
5858
//! FUNCTION main
5959
//! VAR
6060
//! name: STRING;
@@ -86,7 +86,7 @@
8686
//! issues. Compatible here refers to the fact that the order of the member fields must be constant. More
8787
//! specifically, the methods must be defined in "ancestral hierarchical order". To illustrate with the
8888
//! previous examples, assume we have
89-
//! ```
89+
//! ```text
9090
//! TYPE __vtable_A:
9191
//! STRUCT
9292
//! getName: __FPOINTER TO A.getName := ADR(A.getName);

src/lowering/vtable.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
//! # 1. Virtual Table POU Member Field
1010
//! Every root, i.e. non-extended, class or function block will receive a `__vtable: POINTER TO __VOID` member
1111
//! field. For example a function block such as
12-
//! ```norun
12+
//! ```text
1313
//! FUNCTION_BLOCK A
1414
//! VAR
1515
//! one: DINT;
1616
//! END_VAR
1717
//! END_FUNCTION_BLOCK
1818
//! ```
1919
//! will internally expand to
20-
//! ```norun
20+
//! ```text
2121
//! FUNCTION_BLOCK A
2222
//! VAR
2323
//! __vtable: POINTER TO __VOID;
@@ -34,7 +34,7 @@
3434
//! methods `foo` (inherited) and `bar` (overridden) as well as `baz` (new). For these two function blocks we
3535
//! would generate the following virtual table structures:
3636
//!
37-
//! ```norun
37+
//! ```text
3838
//! TYPE __vtable_A:
3939
//! STRUCT
4040
//! foo: __FPOINTER TO A.foo := ADR(A.foo);
@@ -55,7 +55,7 @@
5555
//! The newly created `__vtable` member fields need to point to some instance of the corresponding virtual
5656
//! table. For that we will create one global variable for each virtual table. Deriving from the previous
5757
//! example we would generate the following two variables
58-
//! ```
58+
//! ```text
5959
//! VAR_GLOBAL
6060
//! __vtable_instance_A: __vtable_A;
6161
//! __vtable_instance_B: __vtable_B;

0 commit comments

Comments
 (0)