diff --git a/_static/pygments.css b/_static/pygments.css index e76de2a6..f227e5c6 100644 --- a/_static/pygments.css +++ b/_static/pygments.css @@ -54,7 +54,8 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #000000 } /* Name.Variable */ .highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */ +.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ +.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ .highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ diff --git a/fluent.pygments/1.0/index.html b/fluent.pygments/1.0/index.html index 4b849364..1d715775 100644 --- a/fluent.pygments/1.0/index.html +++ b/fluent.pygments/1.0/index.html @@ -39,7 +39,7 @@

Fluent Syntax HighlightingFluent files in Sphinx.

Installation

-
pip install fluent.pygments
+
pip install fluent.pygments
 
@@ -53,18 +53,18 @@

Usage

Example

-
### A resource comment for the whole file
+
### A resource comment for the whole file
 
 my-key = Localize { -brand-name }
--brand-name = Fluent
+-brand-name = Fluent
 
-# $num is the number of strings to localize
+# $num is the number of strings to localize
 plurals = { $num ->
-  [one] One string
- *[other] {$num} strings
+  [one] One string
+ *[other] {$num} strings
 }
 an error ;-)
-Most-strings = are just simple strings.
+Most-strings = are just simple strings.
 
diff --git a/fluent.pygments/dev/index.html b/fluent.pygments/dev/index.html index b3f42be0..b5aaa084 100644 --- a/fluent.pygments/dev/index.html +++ b/fluent.pygments/dev/index.html @@ -39,7 +39,7 @@

Fluent Syntax HighlightingFluent files in Sphinx.

Installation

-
pip install fluent.pygments
+
pip install fluent.pygments
 
@@ -53,18 +53,18 @@

Usage

Example

-
### A resource comment for the whole file
+
### A resource comment for the whole file
 
 my-key = Localize { -brand-name }
--brand-name = Fluent
+-brand-name = Fluent
 
-# $num is the number of strings to localize
+# $num is the number of strings to localize
 plurals = { $num ->
-  [one] One string
- *[other] {$num} strings
+  [one] One string
+ *[other] {$num} strings
 }
 an error ;-)
-Most-strings = are just simple strings.
+Most-strings = are just simple strings.
 
diff --git a/fluent.pygments/stable/index.html b/fluent.pygments/stable/index.html index 4b849364..1d715775 100644 --- a/fluent.pygments/stable/index.html +++ b/fluent.pygments/stable/index.html @@ -39,7 +39,7 @@

Fluent Syntax HighlightingFluent files in Sphinx.

Installation

-
pip install fluent.pygments
+
pip install fluent.pygments
 
@@ -53,18 +53,18 @@

Usage

Example

-
### A resource comment for the whole file
+
### A resource comment for the whole file
 
 my-key = Localize { -brand-name }
--brand-name = Fluent
+-brand-name = Fluent
 
-# $num is the number of strings to localize
+# $num is the number of strings to localize
 plurals = { $num ->
-  [one] One string
- *[other] {$num} strings
+  [one] One string
+ *[other] {$num} strings
 }
 an error ;-)
-Most-strings = are just simple strings.
+Most-strings = are just simple strings.
 
diff --git a/fluent.runtime/0.3.1/_modules/fluent/runtime.html b/fluent.runtime/0.3.1/_modules/fluent/runtime.html index 37144c9f..43700647 100644 --- a/fluent.runtime/0.3.1/_modules/fluent/runtime.html +++ b/fluent.runtime/0.3.1/_modules/fluent/runtime.html @@ -69,7 +69,7 @@

Source code for fluent.runtime

 
 
 
[docs]class FluentBundle(object): - """ + """ Bundles are single-language stores of translations. They are aggregate parsed Fluent resources in the Fluent syntax and can format translation units (entities) to strings. diff --git a/fluent.runtime/0.3.1/_modules/fluent/runtime/fallback.html b/fluent.runtime/0.3.1/_modules/fluent/runtime/fallback.html index 58ef11d8..1290b008 100644 --- a/fluent.runtime/0.3.1/_modules/fluent/runtime/fallback.html +++ b/fluent.runtime/0.3.1/_modules/fluent/runtime/fallback.html @@ -47,7 +47,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentLocalization(object): - """ + """ Generic API for Fluent applications. This handles language fallback, bundle creation and string localization. @@ -109,11 +109,11 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class AbstractResourceLoader(object): - """ + """ Interface to implement for resource loaders. """
[docs] def resources(self, locale, resource_ids): - """ + """ Yield lists of FluentResource objects, corresponding to each of the resource_ids. If there are multiple locations, this may yield multiple lists. @@ -124,7 +124,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentResourceLoader(AbstractResourceLoader): - """ + """ Resource loader to read Fluent files from disk. Different locales are in different locations based on locale code. @@ -134,7 +134,7 @@

Source code for fluent.runtime.fallback

     different roots.
     """
     def __init__(self, roots):
-        """
+        """
         Create a resource loader. The roots may be a string for a single
         location on disk, or a list of strings.
         """
diff --git a/fluent.runtime/0.3.1/usage.html b/fluent.runtime/0.3.1/usage.html
index 50560784..de57deaa 100644
--- a/fluent.runtime/0.3.1/usage.html
+++ b/fluent.runtime/0.3.1/usage.html
@@ -89,12 +89,12 @@ 

Using FluentLocalizationl10n/de/main.ftl with:

-
second-string = Eine Übersetzung
+
second-string = Eine Übersetzung
 

as well as l10n/en-US/main.ftl with:

-
my-first-string = Fluent can be easy
-second-string = An original string
+
my-first-string = Fluent can be easy
+second-string = An original string
 

As you can see, our first example returned the English string, as that’s on @@ -233,7 +233,7 @@

Custom functionsfunctions dictionary to the FluentLocalization constructor:

>>> import platform
 >>> def os_name():
-...    """Returns linux/mac/windows/other"""
+...    """Returns linux/mac/windows/other"""
 ...    return {'Linux': 'linux',
 ...            'Darwin': 'mac',
 ...            'Windows': 'windows'}.get(platform.system(), 'other')
@@ -245,10 +245,10 @@ 

Custom functionsl10n/en-US/os.ftl as:

welcome = { OS() ->
-   [linux]    Welcome to Linux
-   [mac]      Welcome to Mac
-   [windows]  Welcome to Windows
-  *[other]    Welcome
+   [linux]    Welcome to Linux
+   [mac]      Welcome to Mac
+   [windows]  Welcome to Windows
+  *[other]    Welcome
   }
 
diff --git a/fluent.runtime/0.4.0/_modules/fluent/runtime/bundle.html b/fluent.runtime/0.4.0/_modules/fluent/runtime/bundle.html index 3df73e3c..76b5f51b 100644 --- a/fluent.runtime/0.4.0/_modules/fluent/runtime/bundle.html +++ b/fluent.runtime/0.4.0/_modules/fluent/runtime/bundle.html @@ -58,7 +58,7 @@

Source code for fluent.runtime.bundle

 
 
 
[docs]class FluentBundle: - """ + """ Bundles are single-language stores of translations. They are aggregate parsed Fluent resources in the Fluent syntax and can format translation units (entities) to strings. diff --git a/fluent.runtime/0.4.0/_modules/fluent/runtime/fallback.html b/fluent.runtime/0.4.0/_modules/fluent/runtime/fallback.html index da014448..2fa34041 100644 --- a/fluent.runtime/0.4.0/_modules/fluent/runtime/fallback.html +++ b/fluent.runtime/0.4.0/_modules/fluent/runtime/fallback.html @@ -52,7 +52,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentLocalization: - """ + """ Generic API for Fluent applications. This handles language fallback, bundle creation and string localization. @@ -115,12 +115,12 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class AbstractResourceLoader: - """ + """ Interface to implement for resource loaders. """
[docs] def resources(self, locale: str, resource_ids: List[str]) -> Generator[List['Resource'], None, None]: - """ + """ Yield lists of FluentResource objects, corresponding to each of the resource_ids. If there are multiple locations, this may yield multiple lists. @@ -131,7 +131,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentResourceLoader(AbstractResourceLoader): - """ + """ Resource loader to read Fluent files from disk. Different locales are in different locations based on locale code. @@ -142,7 +142,7 @@

Source code for fluent.runtime.fallback

     """
 
     def __init__(self, roots: Union[str, List[str]]):
-        """
+        """
         Create a resource loader. The roots may be a string for a single
         location on disk, or a list of strings.
         """
diff --git a/fluent.runtime/0.4.0/usage.html b/fluent.runtime/0.4.0/usage.html
index 99aa4068..00cd986e 100644
--- a/fluent.runtime/0.4.0/usage.html
+++ b/fluent.runtime/0.4.0/usage.html
@@ -89,12 +89,12 @@ 

Using FluentLocalizationl10n/de/main.ftl with:

-
second-string = Eine Übersetzung
+
second-string = Eine Übersetzung
 

as well as l10n/en-US/main.ftl with:

-
my-first-string = Fluent can be easy
-second-string = An original string
+
my-first-string = Fluent can be easy
+second-string = An original string
 

As you can see, our first example returned the English string, as that’s on @@ -233,7 +233,7 @@

Custom functionsfunctions dictionary to the FluentLocalization constructor:

>>> import platform
 >>> def os_name():
-...    """Returns linux/mac/windows/other"""
+...    """Returns linux/mac/windows/other"""
 ...    return {'Linux': 'linux',
 ...            'Darwin': 'mac',
 ...            'Windows': 'windows'}.get(platform.system(), 'other')
@@ -245,10 +245,10 @@ 

Custom functionsl10n/en-US/os.ftl as:

welcome = { OS() ->
-   [linux]    Welcome to Linux
-   [mac]      Welcome to Mac
-   [windows]  Welcome to Windows
-  *[other]    Welcome
+   [linux]    Welcome to Linux
+   [mac]      Welcome to Mac
+   [windows]  Welcome to Windows
+  *[other]    Welcome
   }
 
diff --git a/fluent.runtime/dev/_modules/fluent/runtime/bundle.html b/fluent.runtime/dev/_modules/fluent/runtime/bundle.html index 76bbce23..9f0c0406 100644 --- a/fluent.runtime/dev/_modules/fluent/runtime/bundle.html +++ b/fluent.runtime/dev/_modules/fluent/runtime/bundle.html @@ -58,7 +58,7 @@

Source code for fluent.runtime.bundle

 
 
 
[docs]class FluentBundle: - """ + """ Bundles are single-language stores of translations. They are aggregate parsed Fluent resources in the Fluent syntax and can format translation units (entities) to strings. diff --git a/fluent.runtime/dev/_modules/fluent/runtime/fallback.html b/fluent.runtime/dev/_modules/fluent/runtime/fallback.html index a02cbbda..228b76a4 100644 --- a/fluent.runtime/dev/_modules/fluent/runtime/fallback.html +++ b/fluent.runtime/dev/_modules/fluent/runtime/fallback.html @@ -52,7 +52,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentLocalization: - """ + """ Generic API for Fluent applications. This handles language fallback, bundle creation and string localization. @@ -115,12 +115,12 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class AbstractResourceLoader: - """ + """ Interface to implement for resource loaders. """
[docs] def resources(self, locale: str, resource_ids: List[str]) -> Generator[List['Resource'], None, None]: - """ + """ Yield lists of FluentResource objects, corresponding to each of the resource_ids. If there are multiple locations, this may yield multiple lists. @@ -131,7 +131,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentResourceLoader(AbstractResourceLoader): - """ + """ Resource loader to read Fluent files from disk. Different locales are in different locations based on locale code. @@ -142,7 +142,7 @@

Source code for fluent.runtime.fallback

     """
 
     def __init__(self, roots: Union[str, List[str]]):
-        """
+        """
         Create a resource loader. The roots may be a string for a single
         location on disk, or a list of strings.
         """
diff --git a/fluent.runtime/dev/usage.html b/fluent.runtime/dev/usage.html
index b270b433..c446c54d 100644
--- a/fluent.runtime/dev/usage.html
+++ b/fluent.runtime/dev/usage.html
@@ -89,12 +89,12 @@ 

Using FluentLocalizationl10n/de/main.ftl with:

-
second-string = Eine Übersetzung
+
second-string = Eine Übersetzung
 

as well as l10n/en-US/main.ftl with:

-
my-first-string = Fluent can be easy
-second-string = An original string
+
my-first-string = Fluent can be easy
+second-string = An original string
 

As you can see, our first example returned the English string, as that’s on @@ -233,7 +233,7 @@

Custom functionsfunctions dictionary to the FluentLocalization constructor:

>>> import platform
 >>> def os_name():
-...    """Returns linux/mac/windows/other"""
+...    """Returns linux/mac/windows/other"""
 ...    return {'Linux': 'linux',
 ...            'Darwin': 'mac',
 ...            'Windows': 'windows'}.get(platform.system(), 'other')
@@ -245,10 +245,10 @@ 

Custom functionsl10n/en-US/os.ftl as:

welcome = { OS() ->
-   [linux]    Welcome to Linux
-   [mac]      Welcome to Mac
-   [windows]  Welcome to Windows
-  *[other]    Welcome
+   [linux]    Welcome to Linux
+   [mac]      Welcome to Mac
+   [windows]  Welcome to Windows
+  *[other]    Welcome
   }
 
diff --git a/fluent.runtime/stable/_modules/fluent/runtime/bundle.html b/fluent.runtime/stable/_modules/fluent/runtime/bundle.html index 3df73e3c..76b5f51b 100644 --- a/fluent.runtime/stable/_modules/fluent/runtime/bundle.html +++ b/fluent.runtime/stable/_modules/fluent/runtime/bundle.html @@ -58,7 +58,7 @@

Source code for fluent.runtime.bundle

 
 
 
[docs]class FluentBundle: - """ + """ Bundles are single-language stores of translations. They are aggregate parsed Fluent resources in the Fluent syntax and can format translation units (entities) to strings. diff --git a/fluent.runtime/stable/_modules/fluent/runtime/fallback.html b/fluent.runtime/stable/_modules/fluent/runtime/fallback.html index da014448..2fa34041 100644 --- a/fluent.runtime/stable/_modules/fluent/runtime/fallback.html +++ b/fluent.runtime/stable/_modules/fluent/runtime/fallback.html @@ -52,7 +52,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentLocalization: - """ + """ Generic API for Fluent applications. This handles language fallback, bundle creation and string localization. @@ -115,12 +115,12 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class AbstractResourceLoader: - """ + """ Interface to implement for resource loaders. """
[docs] def resources(self, locale: str, resource_ids: List[str]) -> Generator[List['Resource'], None, None]: - """ + """ Yield lists of FluentResource objects, corresponding to each of the resource_ids. If there are multiple locations, this may yield multiple lists. @@ -131,7 +131,7 @@

Source code for fluent.runtime.fallback

 
 
 
[docs]class FluentResourceLoader(AbstractResourceLoader): - """ + """ Resource loader to read Fluent files from disk. Different locales are in different locations based on locale code. @@ -142,7 +142,7 @@

Source code for fluent.runtime.fallback

     """
 
     def __init__(self, roots: Union[str, List[str]]):
-        """
+        """
         Create a resource loader. The roots may be a string for a single
         location on disk, or a list of strings.
         """
diff --git a/fluent.runtime/stable/usage.html b/fluent.runtime/stable/usage.html
index 99aa4068..00cd986e 100644
--- a/fluent.runtime/stable/usage.html
+++ b/fluent.runtime/stable/usage.html
@@ -89,12 +89,12 @@ 

Using FluentLocalizationl10n/de/main.ftl with:

-
second-string = Eine Übersetzung
+
second-string = Eine Übersetzung
 

as well as l10n/en-US/main.ftl with:

-
my-first-string = Fluent can be easy
-second-string = An original string
+
my-first-string = Fluent can be easy
+second-string = An original string
 

As you can see, our first example returned the English string, as that’s on @@ -233,7 +233,7 @@

Custom functionsfunctions dictionary to the FluentLocalization constructor:

>>> import platform
 >>> def os_name():
-...    """Returns linux/mac/windows/other"""
+...    """Returns linux/mac/windows/other"""
 ...    return {'Linux': 'linux',
 ...            'Darwin': 'mac',
 ...            'Windows': 'windows'}.get(platform.system(), 'other')
@@ -245,10 +245,10 @@ 

Custom functionsl10n/en-US/os.ftl as:

welcome = { OS() ->
-   [linux]    Welcome to Linux
-   [mac]      Welcome to Mac
-   [windows]  Welcome to Windows
-  *[other]    Welcome
+   [linux]    Welcome to Linux
+   [mac]      Welcome to Mac
+   [windows]  Welcome to Windows
+  *[other]    Welcome
   }
 
diff --git a/fluent.syntax/0.18.0/_modules/fluent/syntax.html b/fluent.syntax/0.18.0/_modules/fluent/syntax.html index 4ccf0af4..6ab49c82 100644 --- a/fluent.syntax/0.18.0/_modules/fluent/syntax.html +++ b/fluent.syntax/0.18.0/_modules/fluent/syntax.html @@ -43,14 +43,14 @@

Source code for fluent.syntax

 
 
 
[docs]def parse(source, **kwargs): - """Create an ast.Resource from a Fluent Syntax source. + """Create an ast.Resource from a Fluent Syntax source. """ parser = FluentParser(**kwargs) return parser.parse(source)
[docs]def serialize(resource, **kwargs): - """Serialize an ast.Resource to a unicode string. + """Serialize an ast.Resource to a unicode string. """ serializer = FluentSerializer(**kwargs) return serializer.serialize(resource)
diff --git a/fluent.syntax/0.18.0/_modules/fluent/syntax/ast.html b/fluent.syntax/0.18.0/_modules/fluent/syntax/ast.html index 2b4cf093..86a77ae3 100644 --- a/fluent.syntax/0.18.0/_modules/fluent/syntax/ast.html +++ b/fluent.syntax/0.18.0/_modules/fluent/syntax/ast.html @@ -74,7 +74,7 @@

Source code for fluent.syntax.ast

 
 
 def scalars_equal(node1, node2, ignored_fields):
-    """Compare two nodes which are not lists."""
+    """Compare two nodes which are not lists."""
 
     if type(node1) != type(node2):
         return False
@@ -86,16 +86,16 @@ 

Source code for fluent.syntax.ast

 
 
 
[docs]class BaseNode(object): - """Base class for all Fluent AST nodes. + """Base class for all Fluent AST nodes. All productions described in the ASDL subclass BaseNode, including Span and Annotation. Implements __str__, to_json and traverse. """
[docs] def clone(self): - """Create a deep clone of the current node.""" + """Create a deep clone of the current node.""" def visit(value): - """Clone node and its descendants.""" + """Clone node and its descendants.""" if isinstance(value, BaseNode): return value.clone() if isinstance(value, list): @@ -110,7 +110,7 @@

Source code for fluent.syntax.ast

         )
[docs] def equals(self, other, ignored_fields=['span']): - """Compare two nodes. + """Compare two nodes. Nodes are deeply compared on a field by field basis. If possible, False is returned early. When comparing attributes and variants in @@ -163,7 +163,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class SyntaxNode(BaseNode): - """Base class for AST nodes which can have Spans.""" + """Base class for AST nodes which can have Spans.""" def __init__(self, span=None, **kwargs): super(SyntaxNode, self).__init__(**kwargs) @@ -180,7 +180,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Entry(SyntaxNode): - """An abstract base class for useful elements of Resource.body."""
+ """An abstract base class for useful elements of Resource.body."""
[docs]class Message(Entry): @@ -210,7 +210,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class PatternElement(SyntaxNode): - """An abstract base class for elements of Patterns."""
+ """An abstract base class for elements of Patterns."""
[docs]class TextElement(PatternElement): @@ -226,11 +226,11 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Expression(SyntaxNode): - """An abstract base class for expressions."""
+ """An abstract base class for expressions."""
[docs]class Literal(Expression): - """An abstract base class for literals.""" + """An abstract base class for literals.""" def __init__(self, value, **kwargs): super(Literal, self).__init__(**kwargs) self.value = value diff --git a/fluent.syntax/0.18.0/_modules/fluent/syntax/parser.html b/fluent.syntax/0.18.0/_modules/fluent/syntax/parser.html index a089289a..569a94cb 100644 --- a/fluent.syntax/0.18.0/_modules/fluent/syntax/parser.html +++ b/fluent.syntax/0.18.0/_modules/fluent/syntax/parser.html @@ -67,7 +67,7 @@

Source code for fluent.syntax.parser

 
 
 
[docs]class FluentParser(object): - """This class is used to parse Fluent source content. + """This class is used to parse Fluent source content. ``with_spans`` enables source information in the form of :class:`.ast.Span` objects for each :class:`.ast.SyntaxNode`. @@ -76,7 +76,7 @@

Source code for fluent.syntax.parser

         self.with_spans = with_spans
 
 
[docs] def parse(self, source): - """Create a :class:`.ast.Resource` from a Fluent source. + """Create a :class:`.ast.Resource` from a Fluent source. """ ps = FluentParserStream(source) ps.skip_blank_block() @@ -121,7 +121,7 @@

Source code for fluent.syntax.parser

         return res
[docs] def parse_entry(self, source): - """Parse the first :class:`.ast.Entry` in source. + """Parse the first :class:`.ast.Entry` in source. Skip all encountered comments and start parsing at the first :class:`.ast.Message` or :class:`.ast.Term` start. Return :class:`.ast.Junk` if the parsing is not successful. @@ -372,7 +372,7 @@

Source code for fluent.syntax.parser

         return ast.NumberLiteral(num)
 
     def maybe_get_pattern(self, ps):
-        '''Parse an inline or a block Pattern, or None
+        '''Parse an inline or a block Pattern, or None
 
         maybe_get_pattern distinguishes between patterns which start on the
         same line as the indentifier (aka inline singleline patterns and inline
@@ -442,7 +442,7 @@ 

Source code for fluent.syntax.parser

             self.add_span(start, end)
 
     def dedent(self, elements, common_indent):
-        '''Dedent a list of elements by removing the maximum common indent from
+        '''Dedent a list of elements by removing the maximum common indent from
         the beginning of text lines. The common indent is calculated in
         get_pattern.
         '''
diff --git a/fluent.syntax/0.18.0/_modules/fluent/syntax/serializer.html b/fluent.syntax/0.18.0/_modules/fluent/syntax/serializer.html
index fd361b8f..ac4a8830 100644
--- a/fluent.syntax/0.18.0/_modules/fluent/syntax/serializer.html
+++ b/fluent.syntax/0.18.0/_modules/fluent/syntax/serializer.html
@@ -60,7 +60,7 @@ 

Source code for fluent.syntax.serializer

 
 
 
[docs]class FluentSerializer(object): - """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. + """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. `with_junk` controls if parse errors are written back or not. """ diff --git a/fluent.syntax/0.18.0/_modules/fluent/syntax/visitor.html b/fluent.syntax/0.18.0/_modules/fluent/syntax/visitor.html index ba17bc6e..aa5d1f09 100644 --- a/fluent.syntax/0.18.0/_modules/fluent/syntax/visitor.html +++ b/fluent.syntax/0.18.0/_modules/fluent/syntax/visitor.html @@ -46,7 +46,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Visitor(object): - '''Read-only visitor pattern. + '''Read-only visitor pattern. Subclass this to gather information from an AST. To generally define which nodes not to descend in to, overload @@ -72,7 +72,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Transformer(Visitor): - '''In-place AST Transformer pattern. + '''In-place AST Transformer pattern. Subclass this to create an in-place modified variant of the given AST. diff --git a/fluent.syntax/0.18.1/_modules/fluent/syntax.html b/fluent.syntax/0.18.1/_modules/fluent/syntax.html index 9df6c2c6..b8d70ed8 100644 --- a/fluent.syntax/0.18.1/_modules/fluent/syntax.html +++ b/fluent.syntax/0.18.1/_modules/fluent/syntax.html @@ -43,14 +43,14 @@

Source code for fluent.syntax

 
 
 
[docs]def parse(source, **kwargs): - """Create an ast.Resource from a Fluent Syntax source. + """Create an ast.Resource from a Fluent Syntax source. """ parser = FluentParser(**kwargs) return parser.parse(source)
[docs]def serialize(resource, **kwargs): - """Serialize an ast.Resource to a unicode string. + """Serialize an ast.Resource to a unicode string. """ serializer = FluentSerializer(**kwargs) return serializer.serialize(resource)
diff --git a/fluent.syntax/0.18.1/_modules/fluent/syntax/ast.html b/fluent.syntax/0.18.1/_modules/fluent/syntax/ast.html index fcad85ed..a74fa3f7 100644 --- a/fluent.syntax/0.18.1/_modules/fluent/syntax/ast.html +++ b/fluent.syntax/0.18.1/_modules/fluent/syntax/ast.html @@ -74,7 +74,7 @@

Source code for fluent.syntax.ast

 
 
 def scalars_equal(node1, node2, ignored_fields):
-    """Compare two nodes which are not lists."""
+    """Compare two nodes which are not lists."""
 
     if type(node1) != type(node2):
         return False
@@ -86,16 +86,16 @@ 

Source code for fluent.syntax.ast

 
 
 
[docs]class BaseNode(object): - """Base class for all Fluent AST nodes. + """Base class for all Fluent AST nodes. All productions described in the ASDL subclass BaseNode, including Span and Annotation. Implements __str__, to_json and traverse. """
[docs] def clone(self): - """Create a deep clone of the current node.""" + """Create a deep clone of the current node.""" def visit(value): - """Clone node and its descendants.""" + """Clone node and its descendants.""" if isinstance(value, BaseNode): return value.clone() if isinstance(value, list): @@ -110,7 +110,7 @@

Source code for fluent.syntax.ast

         )
[docs] def equals(self, other, ignored_fields=['span']): - """Compare two nodes. + """Compare two nodes. Nodes are deeply compared on a field by field basis. If possible, False is returned early. When comparing attributes and variants in @@ -163,7 +163,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class SyntaxNode(BaseNode): - """Base class for AST nodes which can have Spans.""" + """Base class for AST nodes which can have Spans.""" def __init__(self, span=None, **kwargs): super(SyntaxNode, self).__init__(**kwargs) @@ -180,7 +180,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Entry(SyntaxNode): - """An abstract base class for useful elements of Resource.body."""
+ """An abstract base class for useful elements of Resource.body."""
[docs]class Message(Entry): @@ -210,7 +210,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class PatternElement(SyntaxNode): - """An abstract base class for elements of Patterns."""
+ """An abstract base class for elements of Patterns."""
[docs]class TextElement(PatternElement): @@ -226,11 +226,11 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Expression(SyntaxNode): - """An abstract base class for expressions."""
+ """An abstract base class for expressions."""
[docs]class Literal(Expression): - """An abstract base class for literals.""" + """An abstract base class for literals.""" def __init__(self, value, **kwargs): super(Literal, self).__init__(**kwargs) self.value = value diff --git a/fluent.syntax/0.18.1/_modules/fluent/syntax/parser.html b/fluent.syntax/0.18.1/_modules/fluent/syntax/parser.html index 4e04886d..d3c14376 100644 --- a/fluent.syntax/0.18.1/_modules/fluent/syntax/parser.html +++ b/fluent.syntax/0.18.1/_modules/fluent/syntax/parser.html @@ -67,7 +67,7 @@

Source code for fluent.syntax.parser

 
 
 
[docs]class FluentParser(object): - """This class is used to parse Fluent source content. + """This class is used to parse Fluent source content. ``with_spans`` enables source information in the form of :class:`.ast.Span` objects for each :class:`.ast.SyntaxNode`. @@ -76,7 +76,7 @@

Source code for fluent.syntax.parser

         self.with_spans = with_spans
 
 
[docs] def parse(self, source): - """Create a :class:`.ast.Resource` from a Fluent source. + """Create a :class:`.ast.Resource` from a Fluent source. """ ps = FluentParserStream(source) ps.skip_blank_block() @@ -121,7 +121,7 @@

Source code for fluent.syntax.parser

         return res
[docs] def parse_entry(self, source): - """Parse the first :class:`.ast.Entry` in source. + """Parse the first :class:`.ast.Entry` in source. Skip all encountered comments and start parsing at the first :class:`.ast.Message` or :class:`.ast.Term` start. Return :class:`.ast.Junk` if the parsing is not successful. @@ -372,7 +372,7 @@

Source code for fluent.syntax.parser

         return ast.NumberLiteral(num)
 
     def maybe_get_pattern(self, ps):
-        '''Parse an inline or a block Pattern, or None
+        '''Parse an inline or a block Pattern, or None
 
         maybe_get_pattern distinguishes between patterns which start on the
         same line as the indentifier (aka inline singleline patterns and inline
@@ -442,7 +442,7 @@ 

Source code for fluent.syntax.parser

             self.add_span(start, end)
 
     def dedent(self, elements, common_indent):
-        '''Dedent a list of elements by removing the maximum common indent from
+        '''Dedent a list of elements by removing the maximum common indent from
         the beginning of text lines. The common indent is calculated in
         get_pattern.
         '''
diff --git a/fluent.syntax/0.18.1/_modules/fluent/syntax/serializer.html b/fluent.syntax/0.18.1/_modules/fluent/syntax/serializer.html
index 6a7357a8..aa8abb85 100644
--- a/fluent.syntax/0.18.1/_modules/fluent/syntax/serializer.html
+++ b/fluent.syntax/0.18.1/_modules/fluent/syntax/serializer.html
@@ -74,7 +74,7 @@ 

Source code for fluent.syntax.serializer

 
 
 
[docs]class FluentSerializer(object): - """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. + """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. `with_junk` controls if parse errors are written back or not. """ diff --git a/fluent.syntax/0.18.1/_modules/fluent/syntax/visitor.html b/fluent.syntax/0.18.1/_modules/fluent/syntax/visitor.html index 97b347d3..aaf5e1ba 100644 --- a/fluent.syntax/0.18.1/_modules/fluent/syntax/visitor.html +++ b/fluent.syntax/0.18.1/_modules/fluent/syntax/visitor.html @@ -46,7 +46,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Visitor(object): - '''Read-only visitor pattern. + '''Read-only visitor pattern. Subclass this to gather information from an AST. To generally define which nodes not to descend in to, overload @@ -72,7 +72,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Transformer(Visitor): - '''In-place AST Transformer pattern. + '''In-place AST Transformer pattern. Subclass this to create an in-place modified variant of the given AST. diff --git a/fluent.syntax/0.19.0/_modules/fluent/syntax.html b/fluent.syntax/0.19.0/_modules/fluent/syntax.html index fa0582fc..7f6f67f5 100644 --- a/fluent.syntax/0.19.0/_modules/fluent/syntax.html +++ b/fluent.syntax/0.19.0/_modules/fluent/syntax.html @@ -43,14 +43,14 @@

Source code for fluent.syntax

 
 
 
[docs]def parse(source, **kwargs): - """Create an ast.Resource from a Fluent Syntax source. + """Create an ast.Resource from a Fluent Syntax source. """ parser = FluentParser(**kwargs) return parser.parse(source)
[docs]def serialize(resource, **kwargs): - """Serialize an ast.Resource to a unicode string. + """Serialize an ast.Resource to a unicode string. """ serializer = FluentSerializer(**kwargs) return serializer.serialize(resource)
diff --git a/fluent.syntax/0.19.0/_modules/fluent/syntax/ast.html b/fluent.syntax/0.19.0/_modules/fluent/syntax/ast.html index 0530bc33..3270fd5c 100644 --- a/fluent.syntax/0.19.0/_modules/fluent/syntax/ast.html +++ b/fluent.syntax/0.19.0/_modules/fluent/syntax/ast.html @@ -74,7 +74,7 @@

Source code for fluent.syntax.ast

 
 
 def scalars_equal(node1, node2, ignored_fields):
-    """Compare two nodes which are not lists."""
+    """Compare two nodes which are not lists."""
 
     if type(node1) != type(node2):
         return False
@@ -86,16 +86,16 @@ 

Source code for fluent.syntax.ast

 
 
 
[docs]class BaseNode(object): - """Base class for all Fluent AST nodes. + """Base class for all Fluent AST nodes. All productions described in the ASDL subclass BaseNode, including Span and Annotation. Implements __str__, to_json and traverse. """
[docs] def clone(self): - """Create a deep clone of the current node.""" + """Create a deep clone of the current node.""" def visit(value): - """Clone node and its descendants.""" + """Clone node and its descendants.""" if isinstance(value, BaseNode): return value.clone() if isinstance(value, list): @@ -110,7 +110,7 @@

Source code for fluent.syntax.ast

         )
[docs] def equals(self, other, ignored_fields=['span']): - """Compare two nodes. + """Compare two nodes. Nodes are deeply compared on a field by field basis. If possible, False is returned early. When comparing attributes and variants in @@ -163,7 +163,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class SyntaxNode(BaseNode): - """Base class for AST nodes which can have Spans.""" + """Base class for AST nodes which can have Spans.""" def __init__(self, span=None, **kwargs): super(SyntaxNode, self).__init__(**kwargs) @@ -180,7 +180,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Entry(SyntaxNode): - """An abstract base class for useful elements of Resource.body."""
+ """An abstract base class for useful elements of Resource.body."""
[docs]class Message(Entry): @@ -210,7 +210,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class PatternElement(SyntaxNode): - """An abstract base class for elements of Patterns."""
+ """An abstract base class for elements of Patterns."""
[docs]class TextElement(PatternElement): @@ -226,11 +226,11 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Expression(SyntaxNode): - """An abstract base class for expressions."""
+ """An abstract base class for expressions."""
[docs]class Literal(Expression): - """An abstract base class for literals.""" + """An abstract base class for literals.""" def __init__(self, value, **kwargs): super(Literal, self).__init__(**kwargs) self.value = value diff --git a/fluent.syntax/0.19.0/_modules/fluent/syntax/parser.html b/fluent.syntax/0.19.0/_modules/fluent/syntax/parser.html index b294ea39..6a00d6a8 100644 --- a/fluent.syntax/0.19.0/_modules/fluent/syntax/parser.html +++ b/fluent.syntax/0.19.0/_modules/fluent/syntax/parser.html @@ -67,7 +67,7 @@

Source code for fluent.syntax.parser

 
 
 
[docs]class FluentParser(object): - """This class is used to parse Fluent source content. + """This class is used to parse Fluent source content. ``with_spans`` enables source information in the form of :class:`.ast.Span` objects for each :class:`.ast.SyntaxNode`. @@ -76,7 +76,7 @@

Source code for fluent.syntax.parser

         self.with_spans = with_spans
 
 
[docs] def parse(self, source): - """Create a :class:`.ast.Resource` from a Fluent source. + """Create a :class:`.ast.Resource` from a Fluent source. """ ps = FluentParserStream(source) ps.skip_blank_block() @@ -121,7 +121,7 @@

Source code for fluent.syntax.parser

         return res
[docs] def parse_entry(self, source): - """Parse the first :class:`.ast.Entry` in source. + """Parse the first :class:`.ast.Entry` in source. Skip all encountered comments and start parsing at the first :class:`.ast.Message` or :class:`.ast.Term` start. Return :class:`.ast.Junk` if the parsing is not successful. @@ -372,7 +372,7 @@

Source code for fluent.syntax.parser

         return ast.NumberLiteral(num)
 
     def maybe_get_pattern(self, ps):
-        '''Parse an inline or a block Pattern, or None
+        '''Parse an inline or a block Pattern, or None
 
         maybe_get_pattern distinguishes between patterns which start on the
         same line as the indentifier (aka inline singleline patterns and inline
@@ -442,7 +442,7 @@ 

Source code for fluent.syntax.parser

             self.add_span(start, end)
 
     def dedent(self, elements, common_indent):
-        '''Dedent a list of elements by removing the maximum common indent from
+        '''Dedent a list of elements by removing the maximum common indent from
         the beginning of text lines. The common indent is calculated in
         get_pattern.
         '''
diff --git a/fluent.syntax/0.19.0/_modules/fluent/syntax/serializer.html b/fluent.syntax/0.19.0/_modules/fluent/syntax/serializer.html
index b8e7abf6..89e723ad 100644
--- a/fluent.syntax/0.19.0/_modules/fluent/syntax/serializer.html
+++ b/fluent.syntax/0.19.0/_modules/fluent/syntax/serializer.html
@@ -74,7 +74,7 @@ 

Source code for fluent.syntax.serializer

 
 
 
[docs]class FluentSerializer(object): - """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. + """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. `with_junk` controls if parse errors are written back or not. """ diff --git a/fluent.syntax/0.19.0/_modules/fluent/syntax/visitor.html b/fluent.syntax/0.19.0/_modules/fluent/syntax/visitor.html index f44abd54..46f32c24 100644 --- a/fluent.syntax/0.19.0/_modules/fluent/syntax/visitor.html +++ b/fluent.syntax/0.19.0/_modules/fluent/syntax/visitor.html @@ -46,7 +46,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Visitor(object): - '''Read-only visitor pattern. + '''Read-only visitor pattern. Subclass this to gather information from an AST. To generally define which nodes not to descend in to, overload @@ -72,7 +72,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Transformer(Visitor): - '''In-place AST Transformer pattern. + '''In-place AST Transformer pattern. Subclass this to create an in-place modified variant of the given AST. diff --git a/fluent.syntax/dev/_modules/fluent/syntax.html b/fluent.syntax/dev/_modules/fluent/syntax.html index 85f5d59a..65565119 100644 --- a/fluent.syntax/dev/_modules/fluent/syntax.html +++ b/fluent.syntax/dev/_modules/fluent/syntax.html @@ -43,14 +43,14 @@

Source code for fluent.syntax

 
 
 
[docs]def parse(source, **kwargs): - """Create an ast.Resource from a Fluent Syntax source. + """Create an ast.Resource from a Fluent Syntax source. """ parser = FluentParser(**kwargs) return parser.parse(source)
[docs]def serialize(resource, **kwargs): - """Serialize an ast.Resource to a unicode string. + """Serialize an ast.Resource to a unicode string. """ serializer = FluentSerializer(**kwargs) return serializer.serialize(resource)
diff --git a/fluent.syntax/dev/_modules/fluent/syntax/ast.html b/fluent.syntax/dev/_modules/fluent/syntax/ast.html index ad91eee0..75566230 100644 --- a/fluent.syntax/dev/_modules/fluent/syntax/ast.html +++ b/fluent.syntax/dev/_modules/fluent/syntax/ast.html @@ -74,7 +74,7 @@

Source code for fluent.syntax.ast

 
 
 def scalars_equal(node1, node2, ignored_fields):
-    """Compare two nodes which are not lists."""
+    """Compare two nodes which are not lists."""
 
     if type(node1) != type(node2):
         return False
@@ -86,16 +86,16 @@ 

Source code for fluent.syntax.ast

 
 
 
[docs]class BaseNode(object): - """Base class for all Fluent AST nodes. + """Base class for all Fluent AST nodes. All productions described in the ASDL subclass BaseNode, including Span and Annotation. Implements __str__, to_json and traverse. """
[docs] def clone(self): - """Create a deep clone of the current node.""" + """Create a deep clone of the current node.""" def visit(value): - """Clone node and its descendants.""" + """Clone node and its descendants.""" if isinstance(value, BaseNode): return value.clone() if isinstance(value, list): @@ -110,7 +110,7 @@

Source code for fluent.syntax.ast

         )
[docs] def equals(self, other, ignored_fields=['span']): - """Compare two nodes. + """Compare two nodes. Nodes are deeply compared on a field by field basis. If possible, False is returned early. When comparing attributes and variants in @@ -163,7 +163,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class SyntaxNode(BaseNode): - """Base class for AST nodes which can have Spans.""" + """Base class for AST nodes which can have Spans.""" def __init__(self, span=None, **kwargs): super(SyntaxNode, self).__init__(**kwargs) @@ -180,7 +180,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Entry(SyntaxNode): - """An abstract base class for useful elements of Resource.body."""
+ """An abstract base class for useful elements of Resource.body."""
[docs]class Message(Entry): @@ -210,7 +210,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class PatternElement(SyntaxNode): - """An abstract base class for elements of Patterns."""
+ """An abstract base class for elements of Patterns."""
[docs]class TextElement(PatternElement): @@ -226,11 +226,11 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Expression(SyntaxNode): - """An abstract base class for expressions."""
+ """An abstract base class for expressions."""
[docs]class Literal(Expression): - """An abstract base class for literals.""" + """An abstract base class for literals.""" def __init__(self, value, **kwargs): super(Literal, self).__init__(**kwargs) self.value = value diff --git a/fluent.syntax/dev/_modules/fluent/syntax/parser.html b/fluent.syntax/dev/_modules/fluent/syntax/parser.html index 97e54f43..d1b5069a 100644 --- a/fluent.syntax/dev/_modules/fluent/syntax/parser.html +++ b/fluent.syntax/dev/_modules/fluent/syntax/parser.html @@ -67,7 +67,7 @@

Source code for fluent.syntax.parser

 
 
 
[docs]class FluentParser(object): - """This class is used to parse Fluent source content. + """This class is used to parse Fluent source content. ``with_spans`` enables source information in the form of :class:`.ast.Span` objects for each :class:`.ast.SyntaxNode`. @@ -76,7 +76,7 @@

Source code for fluent.syntax.parser

         self.with_spans = with_spans
 
 
[docs] def parse(self, source): - """Create a :class:`.ast.Resource` from a Fluent source. + """Create a :class:`.ast.Resource` from a Fluent source. """ ps = FluentParserStream(source) ps.skip_blank_block() @@ -121,7 +121,7 @@

Source code for fluent.syntax.parser

         return res
[docs] def parse_entry(self, source): - """Parse the first :class:`.ast.Entry` in source. + """Parse the first :class:`.ast.Entry` in source. Skip all encountered comments and start parsing at the first :class:`.ast.Message` or :class:`.ast.Term` start. Return :class:`.ast.Junk` if the parsing is not successful. @@ -372,7 +372,7 @@

Source code for fluent.syntax.parser

         return ast.NumberLiteral(num)
 
     def maybe_get_pattern(self, ps):
-        '''Parse an inline or a block Pattern, or None
+        '''Parse an inline or a block Pattern, or None
 
         maybe_get_pattern distinguishes between patterns which start on the
         same line as the indentifier (aka inline singleline patterns and inline
@@ -442,7 +442,7 @@ 

Source code for fluent.syntax.parser

             self.add_span(start, end)
 
     def dedent(self, elements, common_indent):
-        '''Dedent a list of elements by removing the maximum common indent from
+        '''Dedent a list of elements by removing the maximum common indent from
         the beginning of text lines. The common indent is calculated in
         get_pattern.
         '''
diff --git a/fluent.syntax/dev/_modules/fluent/syntax/serializer.html b/fluent.syntax/dev/_modules/fluent/syntax/serializer.html
index b64d8b1a..5050e112 100644
--- a/fluent.syntax/dev/_modules/fluent/syntax/serializer.html
+++ b/fluent.syntax/dev/_modules/fluent/syntax/serializer.html
@@ -74,7 +74,7 @@ 

Source code for fluent.syntax.serializer

 
 
 
[docs]class FluentSerializer(object): - """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. + """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. `with_junk` controls if parse errors are written back or not. """ diff --git a/fluent.syntax/dev/_modules/fluent/syntax/visitor.html b/fluent.syntax/dev/_modules/fluent/syntax/visitor.html index faf21a69..d8309e81 100644 --- a/fluent.syntax/dev/_modules/fluent/syntax/visitor.html +++ b/fluent.syntax/dev/_modules/fluent/syntax/visitor.html @@ -46,7 +46,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Visitor(object): - '''Read-only visitor pattern. + '''Read-only visitor pattern. Subclass this to gather information from an AST. To generally define which nodes not to descend in to, overload @@ -72,7 +72,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Transformer(Visitor): - '''In-place AST Transformer pattern. + '''In-place AST Transformer pattern. Subclass this to create an in-place modified variant of the given AST. diff --git a/fluent.syntax/stable/_modules/fluent/syntax.html b/fluent.syntax/stable/_modules/fluent/syntax.html index fa0582fc..7f6f67f5 100644 --- a/fluent.syntax/stable/_modules/fluent/syntax.html +++ b/fluent.syntax/stable/_modules/fluent/syntax.html @@ -43,14 +43,14 @@

Source code for fluent.syntax

 
 
 
[docs]def parse(source, **kwargs): - """Create an ast.Resource from a Fluent Syntax source. + """Create an ast.Resource from a Fluent Syntax source. """ parser = FluentParser(**kwargs) return parser.parse(source)
[docs]def serialize(resource, **kwargs): - """Serialize an ast.Resource to a unicode string. + """Serialize an ast.Resource to a unicode string. """ serializer = FluentSerializer(**kwargs) return serializer.serialize(resource)
diff --git a/fluent.syntax/stable/_modules/fluent/syntax/ast.html b/fluent.syntax/stable/_modules/fluent/syntax/ast.html index 0530bc33..3270fd5c 100644 --- a/fluent.syntax/stable/_modules/fluent/syntax/ast.html +++ b/fluent.syntax/stable/_modules/fluent/syntax/ast.html @@ -74,7 +74,7 @@

Source code for fluent.syntax.ast

 
 
 def scalars_equal(node1, node2, ignored_fields):
-    """Compare two nodes which are not lists."""
+    """Compare two nodes which are not lists."""
 
     if type(node1) != type(node2):
         return False
@@ -86,16 +86,16 @@ 

Source code for fluent.syntax.ast

 
 
 
[docs]class BaseNode(object): - """Base class for all Fluent AST nodes. + """Base class for all Fluent AST nodes. All productions described in the ASDL subclass BaseNode, including Span and Annotation. Implements __str__, to_json and traverse. """
[docs] def clone(self): - """Create a deep clone of the current node.""" + """Create a deep clone of the current node.""" def visit(value): - """Clone node and its descendants.""" + """Clone node and its descendants.""" if isinstance(value, BaseNode): return value.clone() if isinstance(value, list): @@ -110,7 +110,7 @@

Source code for fluent.syntax.ast

         )
[docs] def equals(self, other, ignored_fields=['span']): - """Compare two nodes. + """Compare two nodes. Nodes are deeply compared on a field by field basis. If possible, False is returned early. When comparing attributes and variants in @@ -163,7 +163,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class SyntaxNode(BaseNode): - """Base class for AST nodes which can have Spans.""" + """Base class for AST nodes which can have Spans.""" def __init__(self, span=None, **kwargs): super(SyntaxNode, self).__init__(**kwargs) @@ -180,7 +180,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Entry(SyntaxNode): - """An abstract base class for useful elements of Resource.body."""
+ """An abstract base class for useful elements of Resource.body."""
[docs]class Message(Entry): @@ -210,7 +210,7 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class PatternElement(SyntaxNode): - """An abstract base class for elements of Patterns."""
+ """An abstract base class for elements of Patterns."""
[docs]class TextElement(PatternElement): @@ -226,11 +226,11 @@

Source code for fluent.syntax.ast

 
 
 
[docs]class Expression(SyntaxNode): - """An abstract base class for expressions."""
+ """An abstract base class for expressions."""
[docs]class Literal(Expression): - """An abstract base class for literals.""" + """An abstract base class for literals.""" def __init__(self, value, **kwargs): super(Literal, self).__init__(**kwargs) self.value = value diff --git a/fluent.syntax/stable/_modules/fluent/syntax/parser.html b/fluent.syntax/stable/_modules/fluent/syntax/parser.html index b294ea39..6a00d6a8 100644 --- a/fluent.syntax/stable/_modules/fluent/syntax/parser.html +++ b/fluent.syntax/stable/_modules/fluent/syntax/parser.html @@ -67,7 +67,7 @@

Source code for fluent.syntax.parser

 
 
 
[docs]class FluentParser(object): - """This class is used to parse Fluent source content. + """This class is used to parse Fluent source content. ``with_spans`` enables source information in the form of :class:`.ast.Span` objects for each :class:`.ast.SyntaxNode`. @@ -76,7 +76,7 @@

Source code for fluent.syntax.parser

         self.with_spans = with_spans
 
 
[docs] def parse(self, source): - """Create a :class:`.ast.Resource` from a Fluent source. + """Create a :class:`.ast.Resource` from a Fluent source. """ ps = FluentParserStream(source) ps.skip_blank_block() @@ -121,7 +121,7 @@

Source code for fluent.syntax.parser

         return res
[docs] def parse_entry(self, source): - """Parse the first :class:`.ast.Entry` in source. + """Parse the first :class:`.ast.Entry` in source. Skip all encountered comments and start parsing at the first :class:`.ast.Message` or :class:`.ast.Term` start. Return :class:`.ast.Junk` if the parsing is not successful. @@ -372,7 +372,7 @@

Source code for fluent.syntax.parser

         return ast.NumberLiteral(num)
 
     def maybe_get_pattern(self, ps):
-        '''Parse an inline or a block Pattern, or None
+        '''Parse an inline or a block Pattern, or None
 
         maybe_get_pattern distinguishes between patterns which start on the
         same line as the indentifier (aka inline singleline patterns and inline
@@ -442,7 +442,7 @@ 

Source code for fluent.syntax.parser

             self.add_span(start, end)
 
     def dedent(self, elements, common_indent):
-        '''Dedent a list of elements by removing the maximum common indent from
+        '''Dedent a list of elements by removing the maximum common indent from
         the beginning of text lines. The common indent is calculated in
         get_pattern.
         '''
diff --git a/fluent.syntax/stable/_modules/fluent/syntax/serializer.html b/fluent.syntax/stable/_modules/fluent/syntax/serializer.html
index b8e7abf6..89e723ad 100644
--- a/fluent.syntax/stable/_modules/fluent/syntax/serializer.html
+++ b/fluent.syntax/stable/_modules/fluent/syntax/serializer.html
@@ -74,7 +74,7 @@ 

Source code for fluent.syntax.serializer

 
 
 
[docs]class FluentSerializer(object): - """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. + """FluentSerializer converts :class:`.ast.SyntaxNode` objects to unicode strings. `with_junk` controls if parse errors are written back or not. """ diff --git a/fluent.syntax/stable/_modules/fluent/syntax/visitor.html b/fluent.syntax/stable/_modules/fluent/syntax/visitor.html index f44abd54..46f32c24 100644 --- a/fluent.syntax/stable/_modules/fluent/syntax/visitor.html +++ b/fluent.syntax/stable/_modules/fluent/syntax/visitor.html @@ -46,7 +46,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Visitor(object): - '''Read-only visitor pattern. + '''Read-only visitor pattern. Subclass this to gather information from an AST. To generally define which nodes not to descend in to, overload @@ -72,7 +72,7 @@

Source code for fluent.syntax.visitor

 
 
 
[docs]class Transformer(Visitor): - '''In-place AST Transformer pattern. + '''In-place AST Transformer pattern. Subclass this to create an in-place modified variant of the given AST.