-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#63) Atoms: move most to the Shared assembly
- Loading branch information
Showing
25 changed files
with
34 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using WpfMath.Boxes; | ||
|
||
namespace WpfMath.Atoms; | ||
|
||
/// <summary>Atom (smallest unit) of TexFormula.</summary> | ||
/// <param name="Source"></param> | ||
/// <param name="Type"></param> | ||
internal abstract record Atom(SourceSpan? Source, TexAtomType Type = TexAtomType.Ordinary) | ||
{ | ||
public Box CreateBox(TexEnvironment environment) | ||
{ | ||
var box = this.CreateBoxCore(environment); | ||
if (box.Source == null) | ||
{ | ||
box.Source = this.Source; | ||
} | ||
|
||
return box; | ||
} | ||
|
||
protected abstract Box CreateBoxCore(TexEnvironment environment); | ||
|
||
// Gets type of leftmost child item. | ||
public virtual TexAtomType GetLeftType() | ||
{ | ||
return this.Type; | ||
} | ||
|
||
// Gets type of leftmost child item. | ||
public virtual TexAtomType GetRightType() | ||
{ | ||
return this.Type; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.